From e1e1b94e430a1001704ea63179daf9b3114d1dc9 Mon Sep 17 00:00:00 2001 From: Luke Short Date: Fri, 22 Nov 2024 20:28:33 -0700 Subject: [PATCH] [github_actions] Upload containers images including the new Arch Linux and now supported Ubuntu image. Resolves #14 Resolves #15 --- .../workflows/container-build-all-upload.yml | 63 +++++++++++++++++++ README.md | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/container-build-all-upload.yml diff --git a/.github/workflows/container-build-all-upload.yml b/.github/workflows/container-build-all-upload.yml new file mode 100644 index 0000000..34c18a6 --- /dev/null +++ b/.github/workflows/container-build-all-upload.yml @@ -0,0 +1,63 @@ +name: Upload all container images +on: + push: + tags: + - '*' +jobs: + build: + name: Upload all container images + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Change directory + run: cd $GITHUB_WORKSPACE + - name: Login to Quay.io container registry + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USER }} + password: ${{ secrets.QUAY_TOKEN }} + - name: Build and push Arch Linux container + uses: docker/build-push-action@v6 + with: + context: . + file: Containerfile.archlinux + push: true + tags: | + quay.io/lukeshortcloud/dev-archlinux:latest + quay.io/lukeshortcloud/dev-archlinux:${{ github.ref_name }} + - name: Free up storage space previously used by docker + run: docker system prune --all --force + - name: Build and push Debian container + uses: docker/build-push-action@v6 + with: + context: . + file: Containerfile.debian + push: true + tags: | + quay.io/lukeshortcloud/dev-debian:latest + quay.io/lukeshortcloud/dev-debian:${{ github.ref_name }} + - name: Free up storage space previously used by docker + run: docker system prune --all --force + - name: Build and push Fedora container + uses: docker/build-push-action@v6 + with: + context: . + file: Containerfile.fedora + push: true + tags: | + quay.io/lukeshortcloud/dev-fedora:latest + quay.io/lukeshortcloud/dev-fedora:${{ github.ref_name }} + - name: Free up storage space previously used by docker + run: docker system prune --all --force + - name: Prepare Ubuntu Containerfile + run: cp Containerfile.debian Containerfile.ubuntu && sed -i s'/^FROM debian:.*/FROM ubuntu:24.04/'g Containerfile.ubuntu + - name: Build and push Ubuntu container + uses: docker/build-push-action@v6 + with: + context: . + file: Containerfile.ubuntu + push: true + tags: | + quay.io/lukeshortcloud/dev-ubuntu:latest + quay.io/lukeshortcloud/dev-ubuntu:${{ github.ref_name }} diff --git a/README.md b/README.md index ddcaa7a..23454cd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Container Registry -Quay.io automatically builds and publishes a new container with the tag `:latest` after every commit to the `main` GitHub branch. Every tagged release in GitHub is also built as a container with the same tag. +For each tagged release on GitHub, a GitHub Actions CI/CD pipeline tests each container image build. It then pushes them to the Quay.io container registry using the same tag and also using `latest` as an alias tag. - quay.io/lukeshortcloud/dev-archlinux:latest - quay.io/lukeshortcloud/dev-debian:latest