Skip to content

Upload-Artifacts

Upload-Artifacts #22

name: Upload-Artifacts
on:
workflow_run:
workflows: [Blockifier-CI-Test]
types: [completed]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Authenticate with GCS
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.NADIN_TEST_FORK_BUCKET_ACCESS_KEY }}
- name: Commit hash - 1
# if: ${{ github.event_name == 'pull_request' }}
env:
COMMIT_SHA: ${{ github.event.workflow_run.head_commit.id }}
run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV
- name: Commit hash - 2
# if: ${{ github.event_name == 'pull_request' }}
env:
COMMIT_SHA: ${{ github.event.pull_request.base.sha }}
run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV
- name: Commit hash - 3
# if: ${{ github.event_name == 'pull_request' }}
env:
COMMIT_SHA: ${{ github.event_name == 'pull_request' }}
run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'