Skip to content

Commit

Permalink
fix(ci): update outdated GitHub actions
Browse files Browse the repository at this point in the history
* TODO replace get-diff-action, as it is no longer maintained since 2023-11-24
  • Loading branch information
GoetzGoerisch committed Nov 9, 2024
1 parent 970c6b1 commit 346a133
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 15 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
name: Build Status
on:
[ pull_request, workflow_dispatch]

permissions:
contents: read

jobs:
publish-image:
name: Build Docker Images
Expand All @@ -23,9 +27,10 @@ jobs:
steps:
-
name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Check Diff for Changes
# TODO replace get-diff-action, as it is no longer maintained since 2023-11-24
uses: technote-space/get-diff-action@v6
with:
FILES: |
Expand All @@ -38,15 +43,15 @@ jobs:
if: env.GIT_DIFF
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
if: env.GIT_DIFF
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
if: env.GIT_DIFF
-
name: Build Docker Images
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
push: false
context: .
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
description: 'The distro to build and publish'
type: string
required: true

permissions:
contents: read
packages: write

jobs:
publish-image:
name: Manual Publish Docker Images
Expand All @@ -14,26 +19,26 @@ jobs:
steps:
-
name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Build the Dockerfiles
run: make -j $(nproc)
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: USERNAME
password: ${{ secrets.CR_PAT }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Push to GitHub Packages
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
push: true
context: .
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
name: Publish
on:
push

permissions:
contents: read
packages: write
jobs:
publish-image:
name: Publish Docker Images
Expand All @@ -25,9 +29,10 @@ jobs:
steps:
-
name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Check Diff for Changes
# TODO replace get-diff-action, as it is no longer maintained since 2023-11-24
uses: technote-space/get-diff-action@v6
with:
FILES: |
Expand All @@ -40,23 +45,23 @@ jobs:
if: env.GIT_DIFF
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
if: env.GIT_DIFF
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
if: env.GIT_DIFF
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: env.GIT_DIFF
-
name: Push to GitHub Packages
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
push: true
context: .
Expand Down

0 comments on commit 346a133

Please sign in to comment.