Skip to content

Commit

Permalink
fix: update on-pr-update.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rdash99 committed Oct 10, 2023
1 parent 1bcdd35 commit 09a2dd3
Showing 1 changed file with 3 additions and 37 deletions.
40 changes: 3 additions & 37 deletions .github/workflows/on-pr-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,11 @@ concurrency:

jobs:

slack:
# Open a new PR thread on Slack for this CI run.
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
secrets:
slack-token: ${{ secrets.SLACK_TOKEN }}

changes:
# Detect which files have been changed on this PR's full history
needs: slack
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
filters: |
trino-container:
- './.github/workflows/on-pr-update.yaml'
Expand All @@ -46,9 +36,7 @@ jobs:

trino-container:
# Build the DARE Trino container and push it as :pr-42 and :pr-42-fe45b3h
needs:
- slack
- changes
needs: changes
if: fromJSON(needs.changes.outputs.changes).trino-container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
with:
Expand All @@ -58,19 +46,15 @@ jobs:
container-registry-project: ${{ vars.HARBOR_PROJECT }}
container-registry-repo: ${{ vars.HARBOR_REPO }}
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
build-command: |
docker build -t $IMAGE -f containers/trino/Dockerfile .
secrets:
container-registry-token: ${{ secrets.HARBOR_TOKEN }}
slack-token: ${{ secrets.SLACK_TOKEN }}


chart:
# Build the chart and push it as :pr-42 and :pr-42-fe45b3h
needs:
- slack
- changes
needs: changes
if: fromJSON(needs.changes.outputs.changes).chart == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
with:
Expand All @@ -81,26 +65,8 @@ jobs:
chart-registry-project: ${{ vars.HARBOR_PROJECT }}
chart-registry-repo: ${{ vars.HARBOR_REPO }}
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
test-command: |
helm template $CHART --values charts/trino/values.yaml
secrets:
chart-registry-token: ${{ secrets.HARBOR_TOKEN }}
slack-token: ${{ secrets.SLACK_TOKEN }}

slack-update:
# Update the original Slack message with the final workflow status
# WARNING! ALL UPSTREAM JOBS MUST BE DECLARED HERE TO REPORT FAILURES CORRECTLY!
needs:
- slack
- changes
- trino-container
- chart
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
if: always()
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
status: ${{ contains(join(needs.*.result, ','), 'failure') && ':no_entry:' || ':white_check_mark:' }}
secrets:
slack-token: ${{ secrets.SLACK_TOKEN }}

0 comments on commit 09a2dd3

Please sign in to comment.