Skip to content

Bump Image Tags

Bump Image Tags #55

name: Bump 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 versions will be printed to stdout.
default: false
required: false
schedule:
- cron: "0 0 * * 1" # Run at 00:00 UTC every Monday
env:
team_reviewers: tech-team
jobs:
bump-image-tags:
runs-on: ubuntu-latest
environment: github-app-token-generator
strategy:
fail-fast: false
matrix:
include:
# For each new config_path to monitor, add a new item in this matrix.
# The Action can read multiple paths to images, but not multiple config files.
#
# Bump repo2docker image in BinderHub helm chart
- name: "BinderHub/repo2docker bump"
config_path: "helm-charts/binderhub/values.yaml"
images_info: '[{"values_path": ".binderhub.config.BinderHub.build_image"}]'
# Bump images in openscapes cluster
- name: "OpenScapes profiles"
config_path: "config/clusters/openscapes/common.values.yaml"
# Note: if position of images in profileList changes, update the index in these expressions
images_info: '[{"values_path": ".basehub.jupyterhub.singleuser.profileList[0].profile_options.image.choices.python.kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.singleuser.profileList[0].profile_options.image.choices.rocker.kubespawner_override.image"}, {"values_path": ".basehub.jupyterhub.singleuser.profileList[0].profile_options.image.choices.matlab.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.
# 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: ${{ matrix.name }}"
uses: sgibson91/bump-jhub-image-action@main
with:
config_path: ${{ matrix.config_path }}
images_info: ${{ matrix.images_info }}
github_token: ${{ steps.generate_token.outputs.token }}
# team_reviewers: ${{ env.team_reviewers }}
base_branch: "master"
dry_run: ${{ github.event.inputs.dry_run || true}}