From 3c52ea28a966b3d6eb88c352cda0a3693d567adb Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 3 Aug 2022 13:40:09 +0300 Subject: [PATCH] Run ohw bump image tags workflow more frequently --- .github/workflows/bump-image-tags.yaml | 6 ---- .github/workflows/bump-ohw-image-tags.yaml | 36 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/bump-ohw-image-tags.yaml diff --git a/.github/workflows/bump-image-tags.yaml b/.github/workflows/bump-image-tags.yaml index 34c1f897e6..782b99f7f8 100644 --- a/.github/workflows/bump-image-tags.yaml +++ b/.github/workflows/bump-image-tags.yaml @@ -30,12 +30,6 @@ jobs: # Note: if position of images in profileList changes, update the index in these expressions images_info: '[{"values_path": ".basehub.jupyterhub.profileList[0].profile_options.image.choices.python.kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.profileList[0].profile_options.image.choices.rocker.kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.profileList[0].profile_options.image.choices.matlab.kubespawner_override.image"}]' - # Bump user images in ohw hub - - name: "OceanHackWeek profiles" - config_path: "config/clusters/2i2c/ohw.values.yaml" - # Note: if position of images in profileList changes, update the index in these expressions - images_info: '[{"values_path": ".basehub.jupyterhub.profileList[0].kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.profileList[1].kubespawner_override.image"}]' - steps: # We want tests to be run on the Pull Request that gets opened by the next step, # so we generate a token from a GitHub App that would allow this. diff --git a/.github/workflows/bump-ohw-image-tags.yaml b/.github/workflows/bump-ohw-image-tags.yaml new file mode 100644 index 0000000000..b99cb1861d --- /dev/null +++ b/.github/workflows/bump-ohw-image-tags.yaml @@ -0,0 +1,36 @@ +name: Bump Ohw Image Tags + +on: + workflow_dispatch: + schedule: + - cron: "0 */6 * * *" # Run every 6th hour. +env: + team_reviewers: tech-team + +jobs: + bump-image-tags: + runs-on: ubuntu-latest + environment: github-app-token-generator + steps: + # We want tests to be run on the Pull Request that gets opened by the next step, + # so we generate a token from a GitHub App that would allow this. + # By default, secrets.GITHUB_TOKEN is prevented from triggering + # secondary workflows. + # + # Action: https://github.com/marketplace/actions/github-app-token + - name: Fetch a token from GitHub App + id: generate_token + uses: tibdex/github-app-token@v1.6 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + # Action repo: https://github.com/sgibson91/bump-jhub-image-action + - name: "Bump image tags for OceanHackWeek user profiles" + uses: sgibson91/bump-jhub-image-action@main + with: + config_path: "config/clusters/2i2c/ohw.values.yaml" + images_info: '[{"values_path": ".basehub.jupyterhub.profileList[0].kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.profileList[1].kubespawner_override.image"}]' + github_token: ${{ steps.generate_token.outputs.token }} + # team_reviewers: ${{ env.team_reviewers }} + base_branch: "master"