Skip to content

Commit

Permalink
chore(deps): update swanseauniversitymedical/workflows action to v3 (#51
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: Joss Whittle <joss@chi.swan.ac.uk>
  • Loading branch information
3 people authored Oct 4, 2023
1 parent 279e20b commit eda5f4e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 87 deletions.
88 changes: 13 additions & 75 deletions .github/workflows/on-pr-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ on:
- opened
- synchronize

permissions:
# read on both needed for changes detection
pull-requests: read
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

slack:
# Open a new PR thread on Slack for this CI run.
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v2.8.2
# Open a new PR thread on Slack for this CI run.
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v3.0.0
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
secrets:
Expand All @@ -23,11 +28,10 @@ jobs:
changes:
# Detect which files have been changed on this PR's full history
needs: slack
uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v3.0.0
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
github-app-id: ${{ vars.APP_ID }}
filters: |
container:
- './.github/workflows/on-pr-update.yaml'
Expand All @@ -38,22 +42,20 @@ jobs:
secrets:
slack-token: ${{ secrets.SLACK_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}

jupyterhub-container:
# Build the container and push it as :pr-42 and :pr-42-fe45b3h
needs:
- slack
- changes
if: fromJSON(needs.changes.outputs.changes).container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v3.0.0
with:
job-name: jupyterhub-container
container-registry: ${{ vars.HARBOR_REGISTRY }}
container-registry-user: ${{ vars.HARBOR_USER }}
container-registry-project: ${{ vars.HARBOR_PROJECT }}
container-registry-repo: jupyterhub
github-app-id: ${{ vars.APP_ID }}
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
build-command: |
Expand All @@ -65,7 +67,6 @@ jobs:
docker build -t $IMAGE -f containers/jupyterhub/Dockerfile .
secrets:
container-registry-token: ${{ secrets.HARBOR_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
slack-token: ${{ secrets.SLACK_TOKEN }}

jupyterlab-standard-container:
Expand All @@ -74,14 +75,13 @@ jobs:
- slack
- changes
if: fromJSON(needs.changes.outputs.changes).container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v3.0.0
with:
job-name: jupyterlab-standard-container
container-registry: ${{ vars.HARBOR_REGISTRY }}
container-registry-user: ${{ vars.HARBOR_USER }}
container-registry-project: ${{ vars.HARBOR_PROJECT }}
container-registry-repo: ${{ vars.HARBOR_REPO }}
github-app-id: ${{ vars.APP_ID }}
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
build-command: |
Expand All @@ -93,88 +93,28 @@ jobs:
docker build -t $IMAGE -f containers/jupyterlab/standard.Dockerfile .
secrets:
container-registry-token: ${{ secrets.HARBOR_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
slack-token: ${{ secrets.SLACK_TOKEN }}

# jupyterlab-gpu-container:
# # Build the container and push it as :pr-42 and :pr-42-fe45b3h
# needs:
# - slack
# - changes
# if: fromJSON(needs.changes.outputs.changes).container == 'true'
# uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v2.3.0
# with:
# job-name: jupyterlab-gpu-container
# container-registry: ${{ vars.HARBOR_REGISTRY }}
# container-registry-user: ${{ vars.HARBOR_USER }}
# container-registry-project: ${{ vars.HARBOR_PROJECT }}
# container-registry-repo: jupyterlab-gpu
# github-app-id: ${{ vars.APP_ID }}
# slack-channel: ${{ vars.SLACK_CHANNEL }}
# slack-thread: ${{ needs.slack.outputs.thread }}
# build-command: |
# sudo apt update &&
# sudo apt install python3.8-venv &&
# python -m pip install --user --upgrade build &&
# python -m build --outdir ./dist ./containers/custom-packages/jupyter-cloudbeaver-proxy &&
# python -m build --outdir ./dist ./containers/custom-packages/jupyter-rsession-proxy &&
# docker build -t $IMAGE -f containers/jupyterlab/gpu.Dockerfile .
# secrets:
# container-registry-token: ${{ secrets.HARBOR_TOKEN }}
# github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
# slack-token: ${{ secrets.SLACK_TOKEN }}

# jupyterlab-sparkR-container:
# # Build the container and push it as :pr-42 and :pr-42-fe45b3h
# needs:
# - slack
# - changes
# if: fromJSON(needs.changes.outputs.changes).container == 'true'
# uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v2.3.0
# with:
# job-name: jupyterlab-sparkR-container
# container-registry: ${{ vars.HARBOR_REGISTRY }}
# container-registry-user: ${{ vars.HARBOR_USER }}
# container-registry-project: ${{ vars.HARBOR_PROJECT }}
# container-registry-repo: jupyterlab-sparkR
# github-app-id: ${{ vars.APP_ID }}
# slack-channel: ${{ vars.SLACK_CHANNEL }}
# slack-thread: ${{ needs.slack.outputs.thread }}
# build-command: |
# sudo apt update &&
# sudo apt install python3.8-venv &&
# python -m pip install --user --upgrade build &&
# python -m build --outdir ./dist ./containers/custom-packages/jupyter-cloudbeaver-proxy &&
# python -m build --outdir ./dist ./containers/custom-packages/jupyter-rsession-proxy &&
# docker build -t $IMAGE -f containers/jupyterlab/sparkR.Dockerfile .
# secrets:
# container-registry-token: ${{ secrets.HARBOR_TOKEN }}
# github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
# slack-token: ${{ secrets.SLACK_TOKEN }}


chart:
# Build the chart and push it as :pr-42 and :pr-42-fe45b3h
needs:
- slack
- changes
if: fromJSON(needs.changes.outputs.changes).chart == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v3.0.0
with:
job-name: chart
chart: charts/**
chart-registry: ${{ vars.HARBOR_REGISTRY }}
chart-registry-user: ${{ vars.HARBOR_USER }}
chart-registry-project: ${{ vars.HARBOR_PROJECT }}
chart-registry-repo: ${{ vars.HARBOR_REPO }}
github-app-id: ${{ vars.APP_ID }}
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
test-command: |
helm template $CHART --values charts/jupyter/values.yaml
secrets:
chart-registry-token: ${{ secrets.HARBOR_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
slack-token: ${{ secrets.SLACK_TOKEN }}

slack-update:
Expand All @@ -185,14 +125,12 @@ jobs:
- changes
- jupyterhub-container
- jupyterlab-standard-container
# - jupyterlab-gpu-container
# - jupyterlab-sparkR-container
- chart
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-pr-thread.yaml@v3.0.0
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 }}
slack-token: ${{ secrets.SLACK_TOKEN }}
22 changes: 10 additions & 12 deletions .github/workflows/on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- main

permissions:
# read needed for changes detection
# write needed to author a Github release
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
Expand All @@ -17,7 +22,7 @@ jobs:

slack:
# Open a new PR thread on Slack for this CI run
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v3.0.0
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
secrets:
Expand All @@ -26,11 +31,10 @@ jobs:
changes:
# Detect which files have been changed on this PR's full history
needs: slack
uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/changes.yaml@v3.0.0
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
github-app-id: ${{ vars.APP_ID }}
filters: |
jupyter-container:
- './.github/workflows/on-release.yaml'
Expand All @@ -42,7 +46,6 @@ jobs:
secrets:
slack-token: ${{ secrets.SLACK_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}

######################################################################################################################
# Container Tasks
Expand All @@ -54,11 +57,10 @@ jobs:
- slack
- changes
if: fromJSON(needs.changes.outputs.changes).jupyter-container == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v3.0.0
with:
job-name: jupyter-container
container-registry: ${{ vars.HARBOR_REGISTRY }}
github-app-id: ${{ vars.APP_ID }}
container-registry-user: ${{ vars.HARBOR_USER }}
container-registry-project: ${{ vars.HARBOR_PROJECT }}
container-registry-repo: ${{ vars.HARBOR_REPO }}
Expand All @@ -75,8 +77,6 @@ jobs:
secrets:
container-registry-token: ${{ secrets.HARBOR_TOKEN }}
slack-token: ${{ secrets.SLACK_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}


######################################################################################################################
# Chart Tasks
Expand All @@ -88,23 +88,21 @@ jobs:
- slack
- changes
if: fromJSON(needs.changes.outputs.changes).chart == 'true'
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v3.0.0
with:
job-name: chart
chart-registry: ${{ vars.HARBOR_REGISTRY }}
chart-registry-user: ${{ vars.HARBOR_USER }}
chart-registry-project: ${{ vars.HARBOR_PROJECT }}
chart-registry-repo: ${{ vars.HARBOR_REPO }}
release-tag-format: 'DARE-Jupyter-Helm-${version}'
github-app-id: ${{ vars.APP_ID }}
slack-channel: ${{ vars.SLACK_CHANNEL }}
slack-thread: ${{ needs.slack.outputs.thread }}
chart: charts/**
test-command: |
helm template $CHART --values charts/jupyter/values.yaml
secrets:
chart-registry-token: ${{ secrets.HARBOR_TOKEN }}
github-app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
slack-token: ${{ secrets.SLACK_TOKEN }}

######################################################################################################################
Expand All @@ -120,7 +118,7 @@ jobs:
- jupyter-container
- chart

uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v2.8.2
uses: SwanseaUniversityMedical/workflows/.github/workflows/slack-release-thread.yaml@v3.0.0
if: always()
with:
slack-channel: ${{ vars.SLACK_CHANNEL }}
Expand Down

0 comments on commit eda5f4e

Please sign in to comment.