mirror of
https://github.com/docker/build-push-action.git
synced 2026-06-07 12:24:40 +00:00
Merge pull request #1554 from crazy-max/e2e-ghcr
e2e / build (acr, Azure Container Registry, officialgithubactions.azurecr.io, officialgithubactions.azurecr.io/test-docker-action, remote) (push) Has been cancelled
e2e / build (artifactory, Artifactory, infradock.jfrog.io, infradock.jfrog.io/test-ghaction/build-push-action, remote) (push) Has been cancelled
e2e / build (aws, AWS ECR Public, public.ecr.aws, public.ecr.aws/q3b5f1u4/test-docker-action, remote) (push) Has been cancelled
e2e / build (aws, AWS ECR, 175142243308.dkr.ecr.us-east-2.amazonaws.com, 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action, remote) (push) Has been cancelled
e2e / build (dockerhub, Docker Hub, , ghactionstest/ghactionstest, remote) (push) Has been cancelled
e2e / build (gar, Google Artifact Registry, us-east4-docker.pkg.dev, us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action, remote) (push) Has been cancelled
e2e / build (ghcr, GitHub, ghcr.io, ghcr.io/docker/build-push-action-test, remote) (push) Has been cancelled
e2e / build (gitlab, GitLab, registry.gitlab.com, registry.gitlab.com/test1716/test, remote) (push) Has been cancelled
e2e / build (none, distribution, Distribution, local) (push) Has been cancelled
e2e / build (none, harbor, Harbor, local) (push) Has been cancelled
e2e / build (none, nexus, Nexus, local) (push) Has been cancelled
e2e / build (quay, Quay, quay.io, quay.io/docker_build_team/ghactiontest, remote) (push) Has been cancelled
ci / minimal (push) Has been cancelled
ci / git-context (push) Has been cancelled
ci / git-context-query (push) Has been cancelled
ci / git-context-secret (push) Has been cancelled
ci / path-context (push) Has been cancelled
ci / example (push) Has been cancelled
ci / error (push) Has been cancelled
ci / error-buildx (push) Has been cancelled
ci / docker-driver (push) Has been cancelled
ci / export-docker (push) Has been cancelled
ci / secret (push) Has been cancelled
ci / secret-files (push) Has been cancelled
ci / secret-envs (push) Has been cancelled
ci / network (push) Has been cancelled
ci / shm-size (push) Has been cancelled
ci / ulimit (push) Has been cancelled
ci / cgroup-parent (push) Has been cancelled
ci / add-hosts (push) Has been cancelled
ci / no-cache-filters (push) Has been cancelled
ci / attests-compat (moby/buildkit:buildx-stable-1, latest) (push) Has been cancelled
ci / attests-compat (moby/buildkit:buildx-stable-1, v0.9.1) (push) Has been cancelled
ci / attests-compat (moby/buildkit:latest, edge) (push) Has been cancelled
ci / attests-compat (moby/buildkit:v0.10.6, latest) (push) Has been cancelled
ci / provenance (, /tmp/buildx-build, binary) (push) Has been cancelled
ci / provenance (, type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / provenance (mode=max, /tmp/buildx-build, binary) (push) Has been cancelled
ci / provenance (mode=max, type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / sbom (/tmp/buildx-build, binary) (push) Has been cancelled
ci / sbom (type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / multi (multi) (push) Has been cancelled
ci / multi (multi-sudo) (push) Has been cancelled
ci / digest (docker, false, false) (push) Has been cancelled
ci / digest (docker, false, true) (push) Has been cancelled
ci / digest (docker, true, false) (push) Has been cancelled
ci / digest (docker-container, false, false) (push) Has been cancelled
ci / digest (docker-container, false, true) (push) Has been cancelled
ci / digest (docker-container, true, false) (push) Has been cancelled
ci / registry-cache (push) Has been cancelled
ci / github-cache (push) Has been cancelled
ci / local-cache (push) Has been cancelled
ci / standalone (push) Has been cancelled
ci / named-context-pin (push) Has been cancelled
ci / named-context-docker (push) Has been cancelled
ci / named-context-container (push) Has been cancelled
ci / docker-config-malformed (push) Has been cancelled
ci / proxy-docker-config (push) Has been cancelled
ci / proxy-buildkitd (push) Has been cancelled
ci / annotations (push) Has been cancelled
ci / multi-output (push) Has been cancelled
ci / load-and-push (push) Has been cancelled
ci / summary-disable (push) Has been cancelled
ci / summary-not-supported (push) Has been cancelled
ci / record-upload-disable (push) Has been cancelled
ci / record-retention-days (0) (push) Has been cancelled
ci / record-retention-days (2) (push) Has been cancelled
ci / checks (edge) (push) Has been cancelled
ci / checks (latest) (push) Has been cancelled
ci / checks (v0.14.1) (push) Has been cancelled
ci / annotations-disabled (push) Has been cancelled
ci / call-check (push) Has been cancelled
ci / no-default-attestations (push) Has been cancelled
codeql / analyze (push) Has been cancelled
test / test (push) Has been cancelled
validate / prepare (push) Has been cancelled
zizmor / zizmor (push) Has been cancelled
validate / validate (push) Has been cancelled
e2e / build (acr, Azure Container Registry, officialgithubactions.azurecr.io, officialgithubactions.azurecr.io/test-docker-action, remote) (push) Has been cancelled
e2e / build (artifactory, Artifactory, infradock.jfrog.io, infradock.jfrog.io/test-ghaction/build-push-action, remote) (push) Has been cancelled
e2e / build (aws, AWS ECR Public, public.ecr.aws, public.ecr.aws/q3b5f1u4/test-docker-action, remote) (push) Has been cancelled
e2e / build (aws, AWS ECR, 175142243308.dkr.ecr.us-east-2.amazonaws.com, 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action, remote) (push) Has been cancelled
e2e / build (dockerhub, Docker Hub, , ghactionstest/ghactionstest, remote) (push) Has been cancelled
e2e / build (gar, Google Artifact Registry, us-east4-docker.pkg.dev, us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action, remote) (push) Has been cancelled
e2e / build (ghcr, GitHub, ghcr.io, ghcr.io/docker/build-push-action-test, remote) (push) Has been cancelled
e2e / build (gitlab, GitLab, registry.gitlab.com, registry.gitlab.com/test1716/test, remote) (push) Has been cancelled
e2e / build (none, distribution, Distribution, local) (push) Has been cancelled
e2e / build (none, harbor, Harbor, local) (push) Has been cancelled
e2e / build (none, nexus, Nexus, local) (push) Has been cancelled
e2e / build (quay, Quay, quay.io, quay.io/docker_build_team/ghactiontest, remote) (push) Has been cancelled
ci / minimal (push) Has been cancelled
ci / git-context (push) Has been cancelled
ci / git-context-query (push) Has been cancelled
ci / git-context-secret (push) Has been cancelled
ci / path-context (push) Has been cancelled
ci / example (push) Has been cancelled
ci / error (push) Has been cancelled
ci / error-buildx (push) Has been cancelled
ci / docker-driver (push) Has been cancelled
ci / export-docker (push) Has been cancelled
ci / secret (push) Has been cancelled
ci / secret-files (push) Has been cancelled
ci / secret-envs (push) Has been cancelled
ci / network (push) Has been cancelled
ci / shm-size (push) Has been cancelled
ci / ulimit (push) Has been cancelled
ci / cgroup-parent (push) Has been cancelled
ci / add-hosts (push) Has been cancelled
ci / no-cache-filters (push) Has been cancelled
ci / attests-compat (moby/buildkit:buildx-stable-1, latest) (push) Has been cancelled
ci / attests-compat (moby/buildkit:buildx-stable-1, v0.9.1) (push) Has been cancelled
ci / attests-compat (moby/buildkit:latest, edge) (push) Has been cancelled
ci / attests-compat (moby/buildkit:v0.10.6, latest) (push) Has been cancelled
ci / provenance (, /tmp/buildx-build, binary) (push) Has been cancelled
ci / provenance (, type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / provenance (mode=max, /tmp/buildx-build, binary) (push) Has been cancelled
ci / provenance (mode=max, type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / sbom (/tmp/buildx-build, binary) (push) Has been cancelled
ci / sbom (type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / multi (multi) (push) Has been cancelled
ci / multi (multi-sudo) (push) Has been cancelled
ci / digest (docker, false, false) (push) Has been cancelled
ci / digest (docker, false, true) (push) Has been cancelled
ci / digest (docker, true, false) (push) Has been cancelled
ci / digest (docker-container, false, false) (push) Has been cancelled
ci / digest (docker-container, false, true) (push) Has been cancelled
ci / digest (docker-container, true, false) (push) Has been cancelled
ci / registry-cache (push) Has been cancelled
ci / github-cache (push) Has been cancelled
ci / local-cache (push) Has been cancelled
ci / standalone (push) Has been cancelled
ci / named-context-pin (push) Has been cancelled
ci / named-context-docker (push) Has been cancelled
ci / named-context-container (push) Has been cancelled
ci / docker-config-malformed (push) Has been cancelled
ci / proxy-docker-config (push) Has been cancelled
ci / proxy-buildkitd (push) Has been cancelled
ci / annotations (push) Has been cancelled
ci / multi-output (push) Has been cancelled
ci / load-and-push (push) Has been cancelled
ci / summary-disable (push) Has been cancelled
ci / summary-not-supported (push) Has been cancelled
ci / record-upload-disable (push) Has been cancelled
ci / record-retention-days (0) (push) Has been cancelled
ci / record-retention-days (2) (push) Has been cancelled
ci / checks (edge) (push) Has been cancelled
ci / checks (latest) (push) Has been cancelled
ci / checks (v0.14.1) (push) Has been cancelled
ci / annotations-disabled (push) Has been cancelled
ci / call-check (push) Has been cancelled
ci / no-default-attestations (push) Has been cancelled
codeql / analyze (push) Has been cancelled
test / test (push) Has been cancelled
validate / prepare (push) Has been cancelled
zizmor / zizmor (push) Has been cancelled
validate / validate (push) Has been cancelled
ci(e2e): use GITHUB_TOKEN for GHCR e2e
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
# reusable workflow
|
||||
name: .e2e-run
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
@@ -117,8 +114,8 @@ jobs:
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY_FQDN || inputs.registry }}
|
||||
username: ${{ env.REGISTRY_USER || secrets.registry_username }}
|
||||
password: ${{ env.REGISTRY_PASSWORD || secrets.registry_password }}
|
||||
username: ${{ env.REGISTRY_USER || secrets.registry_username || (inputs.registry == 'ghcr.io' && github.actor) || '' }}
|
||||
password: ${{ env.REGISTRY_PASSWORD || secrets.registry_password || (inputs.registry == 'ghcr.io' && secrets.GITHUB_TOKEN) || '' }}
|
||||
scope: ${{ inputs.type == 'remote' && inputs.registry == '' && '@push' || '' }}
|
||||
-
|
||||
name: Build and push
|
||||
|
||||
@@ -20,6 +20,9 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/.e2e-run.yml
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write # to push image to GHCR
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -38,7 +41,7 @@ jobs:
|
||||
-
|
||||
name: GitHub
|
||||
registry: ghcr.io
|
||||
slug: ghcr.io/docker-ghactiontest/test
|
||||
slug: ghcr.io/docker/build-push-action-test
|
||||
auth: ghcr
|
||||
type: remote
|
||||
-
|
||||
@@ -100,11 +103,11 @@ jobs:
|
||||
registry: ${{ matrix.registry }}
|
||||
slug: ${{ matrix.slug }}
|
||||
secrets:
|
||||
# Pass only the two secrets needed by each matrix entry.
|
||||
# Pass only the registry-specific secrets needed by each matrix entry.
|
||||
# GHCR uses the called workflow's GITHUB_TOKEN fallback.
|
||||
registry_username: >-
|
||||
${{
|
||||
matrix.auth == 'dockerhub' && secrets.DOCKERHUB_USERNAME ||
|
||||
matrix.auth == 'ghcr' && secrets.GHCR_USERNAME ||
|
||||
matrix.auth == 'gitlab' && secrets.GITLAB_USERNAME ||
|
||||
matrix.auth == 'aws' && secrets.AWS_ACCESS_KEY_ID ||
|
||||
matrix.auth == 'gar' && secrets.GAR_USERNAME ||
|
||||
@@ -116,7 +119,6 @@ jobs:
|
||||
registry_password: >-
|
||||
${{
|
||||
matrix.auth == 'dockerhub' && secrets.DOCKERHUB_TOKEN ||
|
||||
matrix.auth == 'ghcr' && secrets.GHCR_PAT ||
|
||||
matrix.auth == 'gitlab' && secrets.GITLAB_TOKEN ||
|
||||
matrix.auth == 'aws' && secrets.AWS_SECRET_ACCESS_KEY ||
|
||||
matrix.auth == 'gar' && secrets.GAR_JSON_KEY ||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
rules:
|
||||
# rule does not apply to reusable worfklows where permissions are defined by
|
||||
# the caller workflow and not the reusable workflow itself
|
||||
excessive-permissions:
|
||||
ignore:
|
||||
- .e2e-run.yml
|
||||
Reference in New Issue
Block a user