Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: updated all deprecated actions #400

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this should be replaced by gh cli.

Example solution:

      - name: Create release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          tag: ${{ github.ref_name }}
        run: |
          gh release create "$tag" \
              --repo="$GITHUB_REPOSITORY" \
              --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
              --generate-notes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub also showed some alternatives actions in the readme

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:
Comment on lines +187 to 189
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the action's readme the new action that seems to replace this one is softprops/action-gh-release

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
Loading