Skip to content

Commit

Permalink
fix(ci): actions/upload/download-artifact upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy committed Feb 28, 2025
1 parent ef461a0 commit 776781c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: nightly-build

on:
schedule:
- cron: '55 23 * * *'
- cron: "55 23 * * *"
push:
branches:
- dev-nightly*
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: "1.23"

- name: Build binaries
run: |
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Make checksums
run: make checksums
- name: store artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries
path: dist
Expand All @@ -51,7 +51,7 @@ jobs:
uses: actions-rust-lang/[email protected]
with:
cache-workspaces: rust -> target
rustflags: ''
rustflags: ""
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Rename binary
run: cp -pv target/x86_64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-amd64
- name: Upload numaflow binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: numaflow-rs-linux-amd64
path: rust/numaflow-rs-linux-amd64
Expand All @@ -84,7 +84,7 @@ jobs:
uses: actions-rust-lang/[email protected]
with:
cache-workspaces: rust -> target
rustflags: ''
rustflags: ""
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
Expand All @@ -98,19 +98,19 @@ jobs:
- name: Rename binary
run: cp -pv target/aarch64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-arm64
- name: Upload numaflow binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: numaflow-rs-linux-arm64
path: rust/numaflow-rs-linux-arm64

build-push-linux-multi:
name: Build & push linux/amd64 and linux/arm64
needs: [ build-go-binaries, build-rust-amd64, build-rust-arm64]
needs: [build-go-binaries, build-rust-amd64, build-rust-arm64]
runs-on: ubuntu-20.04
if: github.repository == 'numaproj/numaflow'
strategy:
matrix:
target: [ numaflow ]
target: [numaflow]
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand All @@ -127,19 +127,19 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Download Go binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries
path: dist/

- name: Download Rust amd64 binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: numaflow-rs-linux-amd64
path: dist/

- name: Download Rust arm64 binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: numaflow-rs-linux-arm64
path: dist/
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: release
on:
push:
tags:
- 'v*'
- "v*"
branches:
- main
- dev-release*
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: "1.23"

- name: Build binaries
run: |
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Make checksums
run: make checksums
- name: store artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries
path: dist
Expand All @@ -48,15 +48,15 @@ jobs:
- name: Setup Rust toolchain
uses: actions-rust-lang/[email protected]
with:
rustflags: ''
rustflags: ""
- name: Install dependencies
run: sudo apt-get install -y protobuf-compiler
- name: Build binary
run: RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-unknown-linux-gnu
- name: Rename binary
run: cp -pv target/x86_64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-amd64
- name: Upload numaflow binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: numaflow-rs-linux-amd64
path: rust/numaflow-rs-linux-amd64
Expand All @@ -74,27 +74,27 @@ jobs:
- name: Setup Rust toolchain
uses: actions-rust-lang/[email protected]
with:
rustflags: ''
rustflags: ""
- name: Install dependenices
run: sudo apt-get install -y gcc-aarch64-linux-gnu protobuf-compiler
- name: Build binary
run: RUSTFLAGS='-C target-feature=+crt-static -C linker=aarch64-linux-gnu-gcc' cargo build --release --target aarch64-unknown-linux-gnu
- name: Rename binary
run: cp -pv target/aarch64-unknown-linux-gnu/release/numaflow numaflow-rs-linux-arm64
- name: Upload numaflow binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: numaflow-rs-linux-arm64
path: rust/numaflow-rs-linux-arm64

build-push-linux-multi:
name: Build & push linux/amd64 and linux/arm64
needs: [ build-go-binaries, build-rust-amd64, build-rust-arm64]
needs: [build-go-binaries, build-rust-amd64, build-rust-arm64]
runs-on: ubuntu-20.04
if: github.repository == 'numaproj/numaflow'
strategy:
matrix:
target: [ numaflow ]
target: [numaflow]
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand All @@ -111,19 +111,19 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Download Go binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries
path: dist/

- name: Download Rust amd64 binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: numaflow-rs-linux-amd64
path: dist/

- name: Download Rust arm64 binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: numaflow-rs-linux-arm64
path: dist/
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
Bom:
runs-on: ubuntu-latest
if: github.repository == 'numaproj/numaflow'
needs: [ build-push-linux-multi ]
needs: [build-push-linux-multi]
steps:
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
- run: |
Expand All @@ -162,7 +162,7 @@ jobs:
fi
- uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: "1.23"
- uses: actions/checkout@v4
- run: go install sigs.k8s.io/bom/cmd/[email protected]
- run: go install github.com/spdx/spdx-sbom-generator/cmd/[email protected]
Expand All @@ -171,15 +171,15 @@ jobs:
- run: bom generate --image quay.io/numaproj/numaflow:$VERSION -o /tmp/numaflow.spdx
# pack the boms into one file to make it easy to download
- run: cd /tmp && tar -zcf sbom.tar.gz *.spdx
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sbom.tar.gz
path: /tmp/sbom.tar.gz

Release:
runs-on: ubuntu-latest
if: github.repository == 'numaproj/numaflow'
needs: [ build-push-linux-multi, bom ]
needs: [build-push-linux-multi, bom]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -191,11 +191,11 @@ jobs:
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
fi
- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries
path: dist/
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: sbom.tar.gz
path: /tmp
Expand All @@ -208,7 +208,7 @@ jobs:
- name: Install cosign
uses: sigstore/[email protected]
with:
cosign-release: 'v1.13.1'
cosign-release: "v1.13.1"

- name: Install crane to get digest of image
uses: imjasonh/[email protected]
Expand Down

0 comments on commit 776781c

Please sign in to comment.