From e83d4f3a2c0fc74cca4c83f66c2b60457c430e37 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 8 Jun 2023 19:47:08 +0200 Subject: [PATCH] .github/workflows: Publish the Arch Linux image at quay.io/toolbx/... Until now, the Arch Linux image was being published at quay.io/toolbx-images/archlinux-toolbox:latest. This renames the image to arch-toolbox [1] to match the os-release(5) ID on Arch, and changes the location to quay.io/toolbx/arch-toolbox:latest. Build and push when there are changes in the 'images/arch' directory or in the GitHub workflow itself, as well as at 00:00 every Monday. [1] Commit 2568528cb7f52663 https://github.com/containers/toolbox/pull/861 https://github.com/containers/toolbox/pull/1308 --- .github/workflows/arch-images.yaml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/arch-images.yaml diff --git a/.github/workflows/arch-images.yaml b/.github/workflows/arch-images.yaml new file mode 100644 index 000000000..83e615b7a --- /dev/null +++ b/.github/workflows/arch-images.yaml @@ -0,0 +1,47 @@ +name: 'Arch Linux: Build and push the arch-toolbox image' + +on: + push: + branches: + - main + paths: + - images/arch/** + - .github/workflows/arch-images.yaml + schedule: + - cron: '0 0 * * MON' + +# Prevent multiple workflow runs from racing +concurrency: ${{ github.workflow }} + +env: + distro: 'arch' + distro_pretty: 'Arch Linux' + +jobs: + build-and-push-images: + name: "${{ env.distro_pretty }}: Build and push the ${{ env.distro }}-toolbox image" + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Quay.io + uses: docker/login-action@v2 + with: + registry: quay.io + username: 'toolbx+github' + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Build and push the ${{ env.distro }}-toolbox image + uses: docker/build-push-action@v3 + with: + context: images/${{ env.distro }} + file: images/${{ env.distro }}/Containerfile + platforms: linux/amd64 + push: true + no-cache: true + tags: quay.io/toolbx/${{ env.distro }}-toolbox:latest