Skip to content

Commit

Permalink
CI: updated all deprecated actions (#400)
Browse files Browse the repository at this point in the history
I have noticed there are a lot of outdated actions with deprecated
warnings:
<img width="956" alt="image"
src="https://github.com/user-attachments/assets/bebf97c0-4a3c-41ba-87db-ab9b6789eb4c">

This PR updates all of GitHub actions to latest version to remove such
warnings.

I have also added some`TODO` to actions that have been archived by
GitHub and that require an alternative action/solution. We can do that
in a different PR once we identify the correct solution.

- [x] Does not require a CHANGELOG entry
  • Loading branch information
Bullrich authored Jul 24, 2024
1 parent c61e836 commit 4eb5267
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Verify
run: .github/changelog-processor.py CHANGELOG.md --validate-changelog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ concurrency:
cancel-in-progress: true

jobs:
name: Check workspace features
check:
name: Check workspace features
runs-on: ubuntu-22.04

steps:
Expand All @@ -28,7 +28,7 @@ jobs:
run: cargo install --locked -q zepter && zepter --version

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Dont clone historic commits.

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runtime: ${{ steps.runtime.outputs.runtime }}
name: Extract tasks from matrix
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: runtime
run: |
# Filter out runtimes that don't have a URI
Expand All @@ -51,7 +51,7 @@ jobs:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build EXTRA_ARGS
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: sudo apt update && sudo apt install --assume-yes cmake protobuf-compiler

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

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

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

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
should-release: ${{ steps.run.outputs.should-release }}
version: ${{ steps.run.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: run
run: |
echo "should-release=$(.github/changelog-processor.py CHANGELOG.md --should-release)" >> $GITHUB_OUTPUT
Expand All @@ -26,7 +26,7 @@ jobs:
outputs:
runtime: ${{ steps.runtime.outputs.runtime }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: runtime
run: |
TASKS=$(echo $(cat .github/workflows/runtimes-matrix.json) | sed 's/ //g' )
Expand All @@ -41,10 +41,10 @@ jobs:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache target dir
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "${{ github.workspace }}/${{ matrix.runtime.path }}/target"
key: srtool-target-${{ matrix.runtime.path }}-${{ matrix.runtime.name }}-${{ github.sha }}
Expand All @@ -68,13 +68,13 @@ jobs:
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime.name }}_srtool_output.json
- name: Upload ${{ matrix.runtime.name }} srtool json
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.runtime.name }}-srtool-json
path: ${{ matrix.runtime.name }}_srtool_output.json

- name: Upload ${{ matrix.runtime.name }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.runtime.name }}
path: |
Expand All @@ -88,13 +88,13 @@ jobs:
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download srtool json output
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Archive context output
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-notes-context
path: |
Expand Down Expand Up @@ -150,6 +150,7 @@ jobs:
- name: Create release
id: create-release
# TODO: Replace as it has been deprecated
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -170,10 +171,10 @@ jobs:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Get runtime info
env:
Expand All @@ -183,6 +184,7 @@ jobs:
>>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion)
- name: Upload compressed ${{ matrix.runtime.name }} v${{ env.SPEC }} wasm
# TODO: Replace as it has been deprecated
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runtime: ${{ steps.runtime.outputs.runtime }}
name: Extract runtimes from matrix
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: runtime
run: |
TASKS=$(echo $(cat .github/workflows/runtimes-matrix.json) | sed 's/ //g' )
Expand All @@ -35,7 +35,7 @@ jobs:
itest: ${{ steps.itest.outputs.itest }}
name: Extract integration tests from matrix
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: itest
run: |
TASKS=$(echo $(cat .github/workflows/integration-tests-matrix.json) | sed 's/ //g' )
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down

0 comments on commit 4eb5267

Please sign in to comment.