Skip to content

Commit

Permalink
[github_actions] Upload containers images
Browse files Browse the repository at this point in the history
including the new Arch Linux and now supported Ubuntu image.

Resolves #14
Resolves #15
  • Loading branch information
LukeShortCloud committed Nov 23, 2024
1 parent 7542f33 commit e1e1b94
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/container-build-all-upload.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1e1b94

Please sign in to comment.