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

[DNM][ci] Test secrets from fork #66

Closed
wants to merge 1 commit into from
Closed
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
31 changes: 7 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

# ${{ vars.CI_UNIFIED_IMAGE }} is defined in the repository variables
env:
CI_IMAGE: "paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240222"
# ${{ secrets.CI_IMAGE_SECRET }} is defined in the repository secrets

jobs:
set-image:
# This workaround sets the container image for each job using 'set-image' job output.
# env variables don't work for PR from forks, so we need to use outputs.
runs-on: ubuntu-latest
outputs:
CI_IMAGE: ${{ steps.set_image.outputs.CI_IMAGE }}
steps:
- id: set_image
run: echo "CI_IMAGE=${{ env.CI_IMAGE }}" >> $GITHUB_OUTPUT
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
image: ${{ secrets.CI_IMAGE_SECRET }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -45,9 +33,8 @@ jobs:
machete:
name: Check unused dependencies
runs-on: ubuntu-latest
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
image: ${{ secrets.CI_IMAGE_SECRET }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -67,9 +54,8 @@ jobs:
check:
name: Cargo check
runs-on: ubuntu-latest
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
image: ${{ secrets.CI_IMAGE_SECRET }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -86,9 +72,8 @@ jobs:
doc:
name: Check documentation
runs-on: ubuntu-latest
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
image: ${{ secrets.CI_IMAGE_SECRET }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -104,9 +89,8 @@ jobs:
clippy:
name: Cargo clippy
runs-on: ubuntu-latest
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
image: ${{ secrets.CI_IMAGE_SECRET }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -127,9 +111,8 @@ jobs:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
image: ${{ secrets.CI_IMAGE_SECRET }}
options: --sysctl net.ipv6.conf.all.disable_ipv6=0
steps:
- name: Checkout sources
Expand Down