Skip to content

Commit

Permalink
upgrade CI actions (#2635)
Browse files Browse the repository at this point in the history
* upgrade CI actions

* with files now

* bumpi
  • Loading branch information
aviramha authored Aug 7, 2024
1 parent 10770c7 commit 01406c1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 41 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
towncrier_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install towncrier
Expand All @@ -68,18 +68,18 @@ jobs:
ci_changed: ${{ steps.changed-ci.outputs.any_changed }}
protocol_changed: ${{ steps.changed-protocol.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: get CI changes
id: changed-ci
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v44
with:
files: |
.github/workflows/ci.yaml
- name: get changed rs files
id: changed-rs
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v44
with:
files: |
**/*.rs
Expand All @@ -93,19 +93,19 @@ jobs:
.cargo/**
- name: get markdown changes
id: changed-markdown
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v44
with:
files: |
README.md
- name: get protocol changes
id: changed-protocol
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v44
with:
files: |
mirrord/protocol/**
- name: get protocol toml changes
id: changed-protocol-toml
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v44
with:
files: |
mirrord/protocol/Cargo.toml
Expand All @@ -130,7 +130,7 @@ jobs:
needs: changed_files
if: ${{needs.changed_files.outputs.rs_changed == 'true' || needs.changed_files.outputs.ci_changed == 'true'}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
# enables the creation of a workspace index.html page.
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options -Dwarnings"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -190,7 +190,7 @@ jobs:
container:
image: ghcr.io/metalbear-co/ci-agent-build:f8330d35a2a4b9132138f6fa9a3f3f80768c7c32
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -202,10 +202,10 @@ jobs:
needs: changed_files
if: ${{needs.changed_files.outputs.rs_changed == 'true' || needs.changed_files.outputs.ci_changed == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v2
- name: build and export
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
tags: test
Expand All @@ -214,7 +214,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
- name: upload image
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test
path: /tmp/test.tar
Expand All @@ -224,7 +224,7 @@ jobs:
needs: [changed_files]
if: ${{needs.changed_files.outputs.rs_changed == 'true' || needs.changed_files.outputs.ci_changed == 'true'}}
steps:
- uses: actions/checkout@v3 # Checkout the mirrord repo.
- uses: actions/checkout@v4 # Checkout the mirrord repo.
- uses: actions-rust-lang/setup-rust-toolchain@v1 # Install rust.
with:
target: x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -336,7 +336,7 @@ jobs:
env:
MIRRORD_TEST_USE_EXISTING_LIB: ../../target/x86_64-apple-darwin/debug/libmirrord_layer.dylib
steps:
- uses: actions/checkout@v3 # Checkout the mirrord repo.
- uses: actions/checkout@v4 # Checkout the mirrord repo.
# the setup rust toolchain action ignores the input if file exists.. so remove it
- run: rm rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down Expand Up @@ -453,13 +453,13 @@ jobs:
env:
MIRRORD_AGENT_RUST_LOG: "warn,mirrord=debug"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1 # Install Rust.
- uses: metalbear-co/ci/e2e-setup-action@main
with:
container-runtime: ${{matrix.container-runtime}}
- name: download image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test
path: /tmp
Expand Down Expand Up @@ -494,7 +494,7 @@ jobs:
needs: changed_files
if: ${{needs.changed_files.outputs.markdown_changed == 'true' || needs.changed_files.outputs.ci_changed == 'true'}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: avto-dev/markdown-lint@v1
with:
config: "markdownlint-config.json"
Expand All @@ -508,14 +508,14 @@ jobs:
needs: check_if_release_branch
if: ${{ needs.check_if_release_branch.outputs.release_branch == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build --manifest-path=./Cargo.toml
- name: upload layer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mirrord-artifacts
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# enables the creation of a workspace index.html page.
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-12-07
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build_binaries_aarch64-unknown-linux-gnu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
Expand All @@ -25,7 +25,7 @@ jobs:
env:
MIRRORD_LAYER_FILE: ../../../target/aarch64-unknown-linux-gnu/release/libmirrord_layer.so
run: RUSTFLAGS="$RUSTFLAGS -A dead_code" cross build --release -p mirrord --target=aarch64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: aarch64-unknown-linux-gnu
path: |
Expand All @@ -35,7 +35,7 @@ jobs:
build_binaries_x86_64-unknown-linux-gnu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
Expand All @@ -44,7 +44,7 @@ jobs:
tool: cross
- name: build mirrord-layer and cli
run: cross build --release -p mirrord -p mirrord-layer --target=x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: x86_64-unknown-linux-gnu
path: |
Expand All @@ -54,15 +54,15 @@ jobs:
build_binaries_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: x86_64-apple-darwin,aarch64-apple-darwin
toolchain: nightly-2024-04-15
rustflags: ""
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93
uses: Apple-Actions/import-codesign-certs@v3
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
run: gon -log-level=debug -log-json .github/workflows/universal_cli_sign.json
- name: adjust directory layout for upload
run: cp -rf /tmp/target .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: universal-apple-darwin
path: |
Expand All @@ -136,14 +136,14 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
id: 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: ${{ github.repository_owner }}
Expand All @@ -155,7 +155,7 @@ jobs:

- name: Build and push (test)
if: github.event_name == 'workflow_dispatch'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: mirrord/agent/Dockerfile
Expand All @@ -166,7 +166,7 @@ jobs:
- name: Build and push (final/release)
if: github.event_name != 'workflow_dispatch'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: mirrord/agent/Dockerfile
Expand All @@ -192,8 +192,8 @@ jobs:
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: /tmp/artifacts
- uses: montudor/action-zip@v1
Expand All @@ -213,7 +213,7 @@ jobs:
shasum -a 256 mirrord_mac_universal.zip > mirrord_mac_universal.shasum256
working-directory: /tmp/artifacts/universal-apple-darwin
# used for the homebrew formula
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: shasum
path: |
Expand Down Expand Up @@ -250,18 +250,18 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: /tmp/artifacts
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get release version and hashes
run: |
echo "version=$(grep -m 1 version Cargo.toml | cut -d' ' -f3 | tr -d '\"' | cut -d'-' -f1)" >> $GITHUB_ENV
echo "sha256_mac=$(cat /tmp/artifacts/shasum/universal-apple-darwin/mirrord_mac_universal.shasum256 | awk '{ print $1 }')" >> $GITHUB_ENV
echo "sha256_linux_aarch64=$(cat /tmp/artifacts/shasum/aarch64-unknown-linux-gnu/mirrord_linux_aarch64.shasum256 | awk '{ print $1 }')" >> $GITHUB_ENV
echo "sha256_linux_x86_64=$(cat /tmp/artifacts/shasum/x86_64-unknown-linux-gnu/mirrord_linux_x86_64.shasum256 | awk '{ print $1 }')" >> $GITHUB_ENV
- name: Checkout into homebrew-mirrord
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: metalbear-co/homebrew-mirrord
path: ./
Expand All @@ -288,7 +288,7 @@ jobs:
if: github.event_name != 'workflow_dispatch'
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Get complete history
fetch-depth: 0
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+update-actions.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update actions

0 comments on commit 01406c1

Please sign in to comment.