-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (35 loc) · 1.3 KB
/
update-images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 }}"