Skip to content

Commit

Permalink
chore(deps): update swanseauniversitymedical/workflows action to v4 (#30
Browse files Browse the repository at this point in the history
)

Co-authored-by: dare-renovate[bot] <129118232+dare-renovate[bot]@users.noreply.github.enterprise.com>
Co-authored-by: rdash99 <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2023
1 parent b7b5671 commit 89ded3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 81 deletions.
42 changes: 5 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: |
hive-container:
- './.github/workflows/on-pr-update.yaml'
Expand All @@ -45,19 +35,16 @@ jobs:

hive-container:
# Build the container and push it as :pr-42 and :pr-42-fe45b3h
needs:
- slack
- changes
needs: changes
if: fromJSON(needs.changes.outputs.changes).hive-container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v3.0.0
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v4.1.0
with:
job-name: hive-container
container-registry: ${{ vars.HARBOR_REGISTRY }}
container-registry-user: ${{ vars.HARBOR_USER }}
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/hive/Dockerfile .
secrets:
Expand All @@ -67,11 +54,9 @@ jobs:

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/on-pr-update-chart.yaml@v3.0.0
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v4.1.0
with:
job-name: hive-chart
chart: charts/**
Expand All @@ -80,26 +65,9 @@ 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/hive/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
- hive-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 }}
48 changes: 4 additions & 44 deletions .github/workflows/on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,11 @@ concurrency:

jobs:

######################################################################################################################
# Pre-Tasks
######################################################################################################################

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: |
hive-container:
- './.github/workflows/on-release.yaml'
Expand All @@ -52,11 +38,9 @@ jobs:

hive-container:
# Build the DARE Hive container and push it as :rc-1.0.0
needs:
- slack
- changes
needs: changes
if: fromJSON(needs.changes.outputs.changes).hive-container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v3.0.0
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v4.1.0
with:
job-name: hive-container
container-registry: ${{ vars.HARBOR_REGISTRY }}
Expand All @@ -65,7 +49,6 @@ jobs:
container-registry-repo: ${{ vars.HARBOR_REPO }}
release-tag-format: 'DARE-Hive-Container-${version}'
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
build-command: |
docker build -t $IMAGE -f containers/hive/Dockerfile .
secrets:
Expand All @@ -82,7 +65,7 @@ jobs:
- slack
- changes
if: fromJSON(needs.changes.outputs.changes).chart == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v3.0.0
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v4.1.0
with:
job-name: chart
chart-registry: ${{ vars.HARBOR_REGISTRY }}
Expand All @@ -91,32 +74,9 @@ jobs:
chart-registry-repo: ${{ vars.HARBOR_REPO }}
release-tag-format: 'DARE-Hive-Helm-${version}'
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
chart: charts/**
test-command: |
helm template $CHART --values charts/hive/values.yaml
secrets:
chart-registry-token: ${{ secrets.HARBOR_TOKEN }}
slack-token: ${{ secrets.SLACK_TOKEN }}

######################################################################################################################
# Post-Tasks
######################################################################################################################

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
- hive-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 89ded3b

Please sign in to comment.