Skip to content

Commit

Permalink
Upgraded github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire committed Jul 26, 2024
1 parent 7e6f890 commit fcb1815
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

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

- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
Expand All @@ -56,34 +56,34 @@ jobs:
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
uses: docker/setup-buildx-action@v3
with:
version: v0.12.0
version: v0.16.2

- name: Go package cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: go-package-cache
key: ${{ matrix.platform.go }}-docker-go-package-${{ hashFiles('go.sum') }}
restore-keys: |
${{ matrix.platform.go }}-docker-go-package-
- name: Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: go-build-cache
key: ${{ matrix.platform.go }}-docker-go-build-${{ hashFiles('go.sum') }}
restore-keys: |
${{ matrix.platform.go }}-docker-go-build-
- name: Inject go package cache into docker
uses: reproducible-containers/buildkit-cache-dance@v2.1.2
uses: reproducible-containers/buildkit-cache-dance@v3
with:
cache-source: go-package-cache
cache-target: /root/go/pkg/mod

- name: Inject go build cache into docker
uses: reproducible-containers/buildkit-cache-dance@v2.1.2
uses: reproducible-containers/buildkit-cache-dance@v3
with:
cache-source: go-build-cache
cache-target: /root/.cache/go-build
Expand All @@ -92,7 +92,7 @@ jobs:
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -102,15 +102,15 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5.0.0
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image in PR
id: build-and-push-pr
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6
if: github.event_name == 'pull_request'
with:
context: .
Expand All @@ -127,7 +127,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push Docker image outside Branch
id: build-and-push
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6
if: github.event_name != 'pull_request'
with:
context: .
Expand All @@ -150,7 +150,7 @@ jobs:
- name: Upload digest
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: digests
path: /tmp/digests/*
Expand All @@ -169,7 +169,7 @@ jobs:

steps:
- name: Download digests
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: digests
path: /tmp/digests
Expand All @@ -178,14 +178,14 @@ jobs:
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
uses: docker/setup-buildx-action@v3
with:
version: v0.12.0

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -194,16 +194,16 @@ jobs:
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
uses: sigstore/cosign-installer@v3.1.2
uses: sigstore/cosign-installer@v3
with:
cosign-release: 'v2.2.0'
cosign-release: 'v2.3.0'


# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5.0.0
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
ext: .wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: "Go cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
Expand All @@ -53,7 +53,7 @@ jobs:
run: tar -cJf "fritzbox-cloudflare-dyndns-${{ matrix.target.arch }}.tar.xz" fritzbox-cloudflare-dyndns${{ matrix.target.ext }}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: fritzbox-cloudflare-dyndns-${{ matrix.target.arch }}
path: fritzbox-cloudflare-dyndns-${{ matrix.target.arch }}.tar.xz

0 comments on commit fcb1815

Please sign in to comment.