Bump Ohw Image Tags #1526
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump Ohw Image Tags | |
on: | |
workflow_dispatch: | |
inputs: | |
dry_run: | |
type: boolean | |
description: | | |
Perform a dry-run of the action and don't open a Pull Request. Information | |
on which images need to be bumped to which tags will be printed to stdout. | |
default: false | |
required: false | |
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/[email protected] | |
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.singleuser.profileList[0].kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.singleuser.profileList[1].kubespawner_override.image"}]' | |
github_token: ${{ steps.generate_token.outputs.token }} | |
# team_reviewers: ${{ env.team_reviewers }} | |
base_branch: "master" | |
dry_run: ${{ github.event.inputs.dry_run || true }} |