mirror of
https://github.com/docker/build-push-action.git
synced 2026-08-24 01:21:47 +00:00
Merge pull request #1595 from crazy-max/dockerhub-oidc
Some checks failed
codeql / analyze (push) Failing after 8s
test / test (push) Failing after 5s
validate / prepare (push) Failing after 5s
validate / validate (push) Has been skipped
zizmor / zizmor (push) Failing after 1s
e2e / build (AWS ECR Public, aws, public.ecr.aws, public.ecr.aws/q3b5f1u4/test-docker-action, remote) (push) Failing after 10s
e2e / build (AWS ECR, aws, 175142243308.dkr.ecr.us-east-2.amazonaws.com, 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action, remote) (push) Failing after 8s
e2e / build (Artifactory, artifactory, infradock.jfrog.io, infradock.jfrog.io/test-ghaction/build-push-action, remote) (push) Failing after 12s
e2e / build (Azure Container Registry, acr, officialgithubactions.azurecr.io, officialgithubactions.azurecr.io/test-docker-action, remote) (push) Failing after 11s
e2e / build (Docker Hub, dockerhub, , dockereng/build-push-action-test, remote) (push) Failing after 14s
e2e / build (GitHub, ghcr, ghcr.io, ghcr.io/docker/build-push-action-test, remote) (push) Failing after 8s
e2e / build (GitLab, gitlab, registry.gitlab.com, registry.gitlab.com/test1716/test, remote) (push) Failing after 11s
e2e / build (Google Artifact Registry, gar, us-east4-docker.pkg.dev, us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action, remote) (push) Failing after 9s
e2e / build (Quay, quay, quay.io, quay.io/docker_build_team/ghactiontest, remote) (push) Failing after 8s
e2e / build (distribution, Distribution, none, local) (push) Failing after 17s
e2e / build (harbor, Harbor, none, local) (push) Failing after 8s
e2e / build (nexus, Nexus, none, local) (push) Failing after 9s
Some checks failed
codeql / analyze (push) Failing after 8s
test / test (push) Failing after 5s
validate / prepare (push) Failing after 5s
validate / validate (push) Has been skipped
zizmor / zizmor (push) Failing after 1s
e2e / build (AWS ECR Public, aws, public.ecr.aws, public.ecr.aws/q3b5f1u4/test-docker-action, remote) (push) Failing after 10s
e2e / build (AWS ECR, aws, 175142243308.dkr.ecr.us-east-2.amazonaws.com, 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action, remote) (push) Failing after 8s
e2e / build (Artifactory, artifactory, infradock.jfrog.io, infradock.jfrog.io/test-ghaction/build-push-action, remote) (push) Failing after 12s
e2e / build (Azure Container Registry, acr, officialgithubactions.azurecr.io, officialgithubactions.azurecr.io/test-docker-action, remote) (push) Failing after 11s
e2e / build (Docker Hub, dockerhub, , dockereng/build-push-action-test, remote) (push) Failing after 14s
e2e / build (GitHub, ghcr, ghcr.io, ghcr.io/docker/build-push-action-test, remote) (push) Failing after 8s
e2e / build (GitLab, gitlab, registry.gitlab.com, registry.gitlab.com/test1716/test, remote) (push) Failing after 11s
e2e / build (Google Artifact Registry, gar, us-east4-docker.pkg.dev, us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action, remote) (push) Failing after 9s
e2e / build (Quay, quay, quay.io, quay.io/docker_build_team/ghactiontest, remote) (push) Failing after 8s
e2e / build (distribution, Distribution, none, local) (push) Failing after 17s
e2e / build (harbor, Harbor, none, local) (push) Failing after 8s
e2e / build (nexus, Nexus, none, local) (push) Failing after 9s
ci(e2e): use Docker Hub OIDC for test image
This commit is contained in:
commit
2ca78c6bec
2
.github/workflows/.e2e-run.yml
vendored
2
.github/workflows/.e2e-run.yml
vendored
@ -130,6 +130,8 @@ jobs:
|
||||
name: Login to Registry
|
||||
if: github.event_name != 'pull_request' && (inputs.type == 'remote' || inputs.provider == 'aws' || env.REGISTRY_USER != '')
|
||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
env:
|
||||
DOCKERHUB_OIDC_CONNECTIONID: ${{ inputs.provider == 'dockerhub' && vars.DOCKERHUB_OIDC_CONNECTIONID || '' }}
|
||||
with:
|
||||
registry: ${{ env.REGISTRY_FQDN || inputs.registry }}
|
||||
username: ${{ env.REGISTRY_USER || secrets.registry_username || (inputs.registry == 'ghcr.io' && github.actor) || '' }}
|
||||
|
||||
7
.github/workflows/e2e.yml
vendored
7
.github/workflows/e2e.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
uses: ./.github/workflows/.e2e-run.yml
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # to get AWS credentials
|
||||
id-token: write # to get Docker Hub and AWS credentials
|
||||
packages: write # to push image to GHCR
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -107,10 +107,10 @@ jobs:
|
||||
secrets:
|
||||
# Pass only the registry-specific secrets needed by each matrix entry.
|
||||
# GHCR uses the called workflow's GITHUB_TOKEN fallback.
|
||||
# AWS ECR uses OIDC to get credentials.
|
||||
# Docker Hub and AWS ECR use OIDC to get credentials.
|
||||
registry_username: >-
|
||||
${{
|
||||
matrix.provider == 'dockerhub' && vars.DOCKERPUBLICBOT_USERNAME ||
|
||||
matrix.provider == 'dockerhub' && 'dockereng' ||
|
||||
matrix.provider == 'gitlab' && secrets.GITLAB_USERNAME ||
|
||||
matrix.provider == 'gar' && secrets.GAR_USERNAME ||
|
||||
matrix.provider == 'acr' && secrets.AZURE_CLIENT_ID ||
|
||||
@ -120,7 +120,6 @@ jobs:
|
||||
}}
|
||||
registry_password: >-
|
||||
${{
|
||||
matrix.provider == 'dockerhub' && secrets.DOCKERPUBLICBOT_WRITE_PAT ||
|
||||
matrix.provider == 'gitlab' && secrets.GITLAB_TOKEN ||
|
||||
matrix.provider == 'gar' && secrets.GAR_JSON_KEY ||
|
||||
matrix.provider == 'acr' && secrets.AZURE_CLIENT_SECRET ||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user