Skip to content

Update jupyter and jupyterhub images #7

Update jupyter and jupyterhub images

Update jupyter and jupyterhub images #7

name: Update jupyter and jupyterhub images
on:
workflow_dispatch:
inputs:
image:
description: 'Image Name'
required: true
default: ''
version:
description: 'Image Version'
required: true
default: ''
jobs:
update-images:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
- name: Update images version
run: |
export IMAGE_NAME=${{ github.event.inputs.image }}
export IMAGE_VERSION=${{ github.event.inputs.version }}
echo "Updating information for image = $IMAGE_NAME version = $IMAGE_VERSION"
sed -i "\|gitlab-registry.cern.ch/swan/docker-images/$IMAGE_NAME|!b;n;s|tag: .*|tag: $IMAGE_VERSION|" swan/values.yaml swan-cern/values.yaml
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Updated image ${{ github.event.inputs.image }} to version ${{ github.event.inputs.version }}"
branch: '${{ github.event.inputs.image }}-${{ github.event.inputs.version }}'
delete-branch: true
title: "Updated image ${{ github.event.inputs.image }} to version ${{ github.event.inputs.version }}"