mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-25 23:49:37 -05:00
ci: fix docker-login on macOS runner (#1877)
This commit is contained in:
parent
c7b22d314a
commit
025d34a259
@ -54,7 +54,7 @@ runs:
|
||||
|
||||
- name: Log in to the Container registry
|
||||
id: docker-login
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
uses: ./.github/actions/container_registry_login
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
35
.github/actions/container_registry_login/action.yml
vendored
Normal file
35
.github/actions/container_registry_login/action.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Create container registry login credentials file
|
||||
description: Delete previously created IAM configuration.
|
||||
|
||||
inputs:
|
||||
registry:
|
||||
description: "Container registry to use"
|
||||
required: true
|
||||
username:
|
||||
description: "Username used for authentication."
|
||||
required: true
|
||||
password:
|
||||
description: "Password used for authentication."
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Use docker for logging in
|
||||
if: runner.os != 'macOS'
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
with:
|
||||
registry: ${{ inputs.registry }}
|
||||
username: ${{ inputs.username }}
|
||||
password: ${{ inputs.password }}
|
||||
|
||||
- name: Manually create docker config.json
|
||||
if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
env:
|
||||
REGISTRY: ${{ inputs.registry }}
|
||||
USERNAME: ${{ inputs.username }}
|
||||
PASSWORD: ${{ inputs.password }}
|
||||
run: |
|
||||
mkdir -p ~/.docker
|
||||
echo "{\"auths\":{\"${REGISTRY}\":{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}}}" | tee ~/.docker/config.json
|
2
.github/actions/e2e_mini/action.yml
vendored
2
.github/actions/e2e_mini/action.yml
vendored
@ -36,7 +36,7 @@ runs:
|
||||
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
uses: ./.github/actions/container_registry_login
|
||||
with:
|
||||
registry: ${{ inputs.registry }}
|
||||
username: ${{ github.actor }}
|
||||
|
4
.github/actions/e2e_test/action.yml
vendored
4
.github/actions/e2e_test/action.yml
vendored
@ -117,7 +117,7 @@ runs:
|
||||
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
uses: ./.github/actions/container_registry_login
|
||||
with:
|
||||
registry: ${{ inputs.registry }}
|
||||
username: ${{ github.actor }}
|
||||
@ -192,7 +192,7 @@ runs:
|
||||
id: create-prefix
|
||||
shell: bash
|
||||
run: |
|
||||
uuid=$(uuidgen)
|
||||
uuid=$(uuidgen | tr "[:upper:]" "[:lower:]")
|
||||
uuid=${uuid%%-*}
|
||||
echo "uuid=${uuid}" | tee -a $GITHUB_OUTPUT
|
||||
echo "prefix=e2e-${{ github.run_id }}-${{ github.run_attempt }}-${uuid}" | tee -a $GITHUB_OUTPUT
|
||||
|
2
.github/workflows/build-ccm-gcp.yml
vendored
2
.github/workflows/build-ccm-gcp.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
- name: Log in to the Container registry
|
||||
id: docker-login
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
uses: ./.github/actions/container_registry_login
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
|
2
.github/workflows/build-gcp-guest-agent.yml
vendored
2
.github/workflows/build-gcp-guest-agent.yml
vendored
@ -100,7 +100,7 @@ jobs:
|
||||
- name: Log in to the Container registry
|
||||
id: docker-login
|
||||
if: steps.needs-build.outputs.out == 'true'
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
uses: ./.github/actions/container_registry_login
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
|
2
.github/workflows/e2e-test-manual.yml
vendored
2
.github/workflows/e2e-test-manual.yml
vendored
@ -241,7 +241,7 @@ jobs:
|
||||
machineType: ${{ inputs.machineType }}
|
||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||
gcpClusterCreateServiceAccount: "constellation-e2e-cluster@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpIAMCreateServiceAccount: " constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpIAMCreateServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpInClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||
test: ${{ inputs.test }}
|
||||
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
||||
|
2
.github/workflows/e2e-test-release.yml
vendored
2
.github/workflows/e2e-test-release.yml
vendored
@ -197,7 +197,7 @@ jobs:
|
||||
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}
|
||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||
gcpClusterCreateServiceAccount: "constellation-e2e-cluster@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpIAMCreateServiceAccount: " constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpIAMCreateServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpInClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||
test: ${{ matrix.test }}
|
||||
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
|
||||
|
2
.github/workflows/e2e-test-weekly.yml
vendored
2
.github/workflows/e2e-test-weekly.yml
vendored
@ -199,7 +199,7 @@ jobs:
|
||||
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}
|
||||
gcpProject: ${{ secrets.GCP_E2E_PROJECT }}
|
||||
gcpClusterCreateServiceAccount: "constellation-e2e-cluster@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpIAMCreateServiceAccount: " constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpIAMCreateServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
|
||||
gcpInClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }}
|
||||
test: ${{ matrix.test }}
|
||||
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
|
||||
|
2
.github/workflows/release-cli.yml
vendored
2
.github/workflows/release-cli.yml
vendored
@ -89,7 +89,7 @@ jobs:
|
||||
useCache: "false"
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
|
||||
uses: ./.github/actions/container_registry_login
|
||||
with:
|
||||
registry: ${{ inputs.registry }}
|
||||
username: ${{ github.actor }}
|
||||
|
Loading…
Reference in New Issue
Block a user