mirror of
https://github.com/docker/login-action.git
synced 2026-06-05 02:57:52 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0267638d8a | |||
| 250c56f969 |
@@ -7,6 +7,9 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GHCR_TEST_IMAGE: ghcr.io/docker/login-action-test:ci-${{ github.sha }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
@@ -56,8 +59,39 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
logout: ${{ matrix.logout }}
|
||||
|
||||
push-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: ./
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push test image
|
||||
run: |
|
||||
docker buildx build --push -t "${GHCR_TEST_IMAGE}" - <<EOF
|
||||
FROM scratch
|
||||
LABEL org.opencontainers.image.title="docker/login-action CI test image"
|
||||
LABEL org.opencontainers.image.description="Empty image used by CI to verify GHCR authentication."
|
||||
LABEL org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}"
|
||||
EOF
|
||||
|
||||
dind:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- push-ghcr
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
env:
|
||||
DOCKER_CONFIG: $HOME/.docker
|
||||
steps:
|
||||
@@ -69,19 +103,19 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USERNAME }}
|
||||
password: ${{ secrets.GHCR_PAT }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: DinD
|
||||
uses: docker://docker:29.3@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
||||
with:
|
||||
entrypoint: docker
|
||||
args: pull ghcr.io/docker-ghactiontest/test
|
||||
args: pull ${{ env.GHCR_TEST_IMAGE }}
|
||||
-
|
||||
name: Pull private image
|
||||
name: Pull test image
|
||||
run: |
|
||||
docker image prune -a -f >/dev/null 2>&1
|
||||
docker pull ghcr.io/docker-ghactiontest/test
|
||||
docker pull "${GHCR_TEST_IMAGE}"
|
||||
|
||||
acr:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -150,7 +184,7 @@ jobs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
-
|
||||
name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0
|
||||
uses: aws-actions/configure-aws-credentials@acca2b1b2070338fb9fd1ca27ecee81d687e58e5 # v6.1.2
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
@@ -198,7 +232,7 @@ jobs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
-
|
||||
name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0
|
||||
uses: aws-actions/configure-aws-credentials@acca2b1b2070338fb9fd1ca27ecee81d687e58e5 # v6.1.2
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user