Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run ohw bump image tags workflow more frequently #1588

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/bump-image-tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/bump-ohw-image-tags.yaml
Original file line number Diff line number Diff line change
@@ -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"