Skip to content

Commit

Permalink
Bump GitHub actions (#13)
Browse files Browse the repository at this point in the history
### WHY / WHAT are these changes introduced?

`upload-artifact@v3` is deprecated and will start with brownouts on Nov 14. We had tons of warnings from other actions, so decided to bump them all.

For `upload-artifact`, there are breaking changes https://github.com/actions/upload-artifact/blob/v4.4.3/docs/MIGRATION.md, so we had to use unique names.

Couldn't spot anything breaking for other bumps (doesn't mean there aren't any though)

### HOW can this pull request be tested?

If CI runs well it covers most cases (from first glance, all of them).
  • Loading branch information
walro authored Nov 7, 2024
1 parent cd2cbaf commit 3c60266
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
container: 84codes/crystal:latest-alpine
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Shards install
run: shards install --production
- name: Spec
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
container: 84codes/crystal:latest-alpine
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Format check
run: crystal tool format --check
lint:
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Install make
run: apk add --no-cache make yaml-dev
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Shards install
run: shards install
- name: Spec
Expand All @@ -44,22 +44,22 @@ jobs:
needs: [spec, format, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/metadata-action@v3
- uses: actions/checkout@v4
- uses: docker/metadata-action@v5
id: meta
with:
images: 84codes/sparoid
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=ref,event=tag
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push container
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -77,10 +77,10 @@ jobs:
arch: [amd64, arm64]
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, debian-10, debian-11, debian-12]
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v3
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
name: Build
with:
file: deb.dockerfile
Expand All @@ -91,9 +91,9 @@ jobs:
build_image=84codes/crystal:latest-${{ matrix.os }}
outputs: builds
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: debs
name: deb-${{ matrix.arch }}-${{ matrix.os }}
path: builds/
- name: Upload to PackageCloud
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
Expand All @@ -119,10 +119,10 @@ jobs:
os: [fedora-39, fedora-40]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v3
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
file: rpm.dockerfile
platforms: linux/${{ matrix.arch }}
Expand All @@ -132,9 +132,9 @@ jobs:
build_image=84codes/crystal:latest-${{ matrix.os }}
outputs: builds
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rpms
name: rpm-${{ matrix.arch }}-${{ matrix.os }}
path: builds/
- name: Upload to PackageCloud
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
Expand All @@ -154,18 +154,18 @@ jobs:
runs-on: ubuntu-latest
needs: [spec, format, lint]
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build tar package
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
file: tar.dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: .
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tar
path: ./*.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion tar.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM 84codes/crystal:1.5.0-alpine-latest as build-stage
FROM 84codes/crystal:1.5.0-alpine-latest AS build-stage
WORKDIR /tmp
COPY shard.yml shard.lock README.md LICENSE ./
RUN shards install --production
Expand Down

0 comments on commit 3c60266

Please sign in to comment.