Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Modernize CI #2487

Merged
merged 6 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: Update dependencies of Docker workflow
  • Loading branch information
AaronDewes committed Jan 3, 2025
commit 388a8943b61a2727cfdef026277e870e78f397d8
29 changes: 17 additions & 12 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: Build Docker container on push

on:
push:
branches:
- "*"
push:
branches:
- "*"

jobs:
build:
name: Build image
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set env variables
run: |
Expand All @@ -21,23 +26,23 @@ jobs:
echo "IMAGE_NAME=${REPO_OWNER,,}/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
id: qemu

- name: Setup Docker buildx action
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
id: buildx

- name: Run Docker buildx
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/$IMAGE_NAME:$BRANCH \
--output "type=registry" ./
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/$IMAGE_NAME:$BRANCH \
--output "type=registry" ./
18 changes: 9 additions & 9 deletions .github/workflows/docker-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
jobs:
build:
name: Build image
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set env variables
run: |
Expand All @@ -22,21 +22,21 @@ jobs:
echo "IMAGE_NAME=${REPO_OWNER,,}/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Setup Docker buildx action
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Run Docker buildx
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/$IMAGE_NAME:$TAG \
--output "type=registry" ./
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/$IMAGE_NAME:$TAG \
--output "type=registry" ./