Use repo-scoped image for internal build image (#821)
* Use repo-scoped image for internal build image Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
This commit is contained in:
15
.github/workflows/internal-images.yml
vendored
15
.github/workflows/internal-images.yml
vendored
@@ -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=<hex token value>
|
||||
# GITHUB_TOKEN=<hex token value>
|
||||
# - 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 }}
|
||||
|
||||
Reference in New Issue
Block a user