From 25d990156834f450ce82d6e6622324dcb675ba96 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Tue, 4 Oct 2022 14:05:50 +0900 Subject: [PATCH] Use repo-scoped image for internal build image (#821) * Use repo-scoped image for internal build image Signed-off-by: Anuraag Agrawal --- .github/workflows/internal-images.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/internal-images.yml b/.github/workflows/internal-images.yml index ce9b6b85..15884148 100644 --- a/.github/workflows/internal-images.yml +++ b/.github/workflows/internal-images.yml @@ -8,11 +8,11 @@ on: - cron: "23 3 * * *" workflow_dispatch: # Allows manual refresh -# This builds images and pushes them to ghcr.io/tetratelabs/wazero-internal:$tag +# This builds images and pushes them to ghcr.io/tetratelabs/wazero/internal-$tag # Using these avoid docker.io rate-limits particularly on pull requests. jobs: copy-images: - runs-on: ubuntu-20.04 # Hard-coding an LTS means maintenance, but only once each 2 years! + runs-on: ubuntu-22.04 # Hard-coding an LTS means maintenance, but only once each 2 years! strategy: matrix: # Be precise in tag versions to improve reproducibility @@ -23,19 +23,18 @@ jobs: steps: # Same as doing this locally: echo "${GHCR_TOKEN}" | docker login ghcr.io -u "${GHCR_TOKEN}" --password-stdin - name: "Login into GitHub Container Registry" - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} - # GHCR_TOKEN= + # GITHUB_TOKEN= # - pushes Docker images to ghcr.io # - create via https://github.com/settings/tokens - # - assign via https://github.com/organizations/tetratelabs/settings/secrets/actions # - needs repo:status, public_repo, write:packages, delete:packages - password: ${{ secrets.GHCR_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Pull and push run: | # This will only push a single architecture, which is fine as we currently only support amd64 docker pull ${{ matrix.source }} - docker tag ${{ matrix.source }} ghcr.io/tetratelabs/wazero-internal:${{ matrix.target_tag }} - docker push ghcr.io/tetratelabs/wazero-internal:${{ matrix.target_tag }} + docker tag ${{ matrix.source }} ghcr.io/${{ github.repository }}/internal-${{ matrix.target_tag }} + docker push ghcr.io/${{ github.repository }}/internal-${{ matrix.target_tag }}