Skip to content

Commit

Permalink
workflows: move tasks container to ghcr.io
Browse files Browse the repository at this point in the history
This speeds things up (due to having the runner closer to the registry)
and simplifies credentials management: we'll be able to drop our quay.io
environment after this.

Move the amd64 and manifest jobs back to GitHub so they can run on
GitHub infra, closer to the container registry.
  • Loading branch information
allisonkarlitskaya committed Mar 16, 2024
1 parent 1a44b6e commit c7ea836
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/build-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ on:
# where different runners pick different tags (eg: for builds near midnight, or
# in different time zones). The manifest job picks the final name.
env:
tag: quay.io/cockpit/tasks
tmptag: quay.io/cockpit/tasks-tmp:${{ github.run_id }}.${{ github.run_attempt }}
tag: ghcr.io/${{ github.repository_owner }}/tasks
tmptag: ghcr.io/${{ github.repository_owner }}/tasks-tmp:${{ github.run_id }}.${{ github.run_attempt }}

jobs:
build:
strategy:
matrix:
build:
- label: amd64
runner: buildjet-2vcpu-ubuntu-2204
runner: ubuntu-22.04
- label: arm64
runner: buildjet-2vcpu-ubuntu-2204-arm

runs-on: ${{ matrix.build.runner }}
environment: quay.io
timeout-minutes: 10

steps:
Expand All @@ -31,9 +30,9 @@ jobs:
name: Log in to container registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_BOTUSER }}
password: ${{ secrets.QUAY_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Checkout
uses: actions/checkout@v4
Expand All @@ -49,14 +48,13 @@ jobs:
manifest:
needs: build

runs-on: buildjet-2vcpu-ubuntu-2204
environment: quay.io
runs-on: ubuntu-22.04
timeout-minutes: 5

steps:
-
name: Login in to container registry
run: podman login -u ${{ secrets.QUAY_BOTUSER }} -p ${{ secrets.QUAY_TOKEN }} quay.io
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
-
name: Create manifest
run: podman manifest create tasks '${{ env.tmptag }}'-{amd,arm}64
Expand Down

0 comments on commit c7ea836

Please sign in to comment.