Skip to content

Add a condition for S3 steps to run only when AWS secrets are present #797

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

Merged
3 commits merged into from
Dec 8, 2022
Merged
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
7 changes: 7 additions & 0 deletions .github/workflows/build-node-and-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ubuntu-20.04
env:
RUST_BACKTRACE: full
SECRETS_AWS_MAINNET_ACCESS_KEY_ID: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }}
SECRETS_AWS_MAINNET_SECRET_ACCESS_KEY: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
Expand Down Expand Up @@ -65,6 +67,7 @@ jobs:
retention-days: 7

- name: S3 CI | Configure AWS credentials
if: env.SECRETS_AWS_MAINNET_ACCESS_KEY_ID != '' && env.SECRETS_AWS_MAINNET_SECRET_ACCESS_KEY != ''
uses: aws-actions/configure-aws-credentials@v1
env:
AWS_REGION: us-east-1
Expand All @@ -74,6 +77,7 @@ jobs:
aws-region: ${{ env.AWS_REGION }}

- name: S3 CI | Copy release binary to S3 bucket
if: env.SECRETS_AWS_MAINNET_ACCESS_KEY_ID != '' && env.SECRETS_AWS_MAINNET_SECRET_ACCESS_KEY != ''
shell: bash
env:
BINARY_DIR: target/production
Expand All @@ -85,6 +89,7 @@ jobs:
aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}

- name: S3 CI | Copy release runtime to S3 bucket
if: env.SECRETS_AWS_MAINNET_ACCESS_KEY_ID != '' && env.SECRETS_AWS_MAINNET_SECRET_ACCESS_KEY != ''
shell: bash
env:
BINARY_DIR: target/production/wbuild/aleph-runtime
Expand Down Expand Up @@ -115,6 +120,7 @@ jobs:
retention-days: 7

- name: S3 CI | Copy test binary to S3 bucket
if: env.SECRETS_AWS_MAINNET_ACCESS_KEY_ID != '' && env.SECRETS_AWS_MAINNET_SECRET_ACCESS_KEY != ''
shell: bash
env:
BINARY_DIR: target/release
Expand All @@ -126,6 +132,7 @@ jobs:
aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}

- name: S3 CI | Copy test runtime to S3 bucket
if: env.SECRETS_AWS_MAINNET_ACCESS_KEY_ID != '' && env.SECRETS_AWS_MAINNET_SECRET_ACCESS_KEY != ''
shell: bash
env:
BINARY_DIR: target/release/wbuild/aleph-runtime
Expand Down