diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 261e7ed..b30bece 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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}" - </dev/null 2>&1 - docker pull ghcr.io/docker-ghactiontest/test + docker pull "${GHCR_TEST_IMAGE}" acr: runs-on: ubuntu-latest