Skip to content

Update packages of Jupyter images #22

Update packages of Jupyter images

Update packages of Jupyter images #22

name: Update packages of Jupyter images
on:
workflow_dispatch:
inputs:
package:
description: 'Package Name'
required: true
default: ''
version:
description: 'Package Version'
required: true
default: ''
jobs:
update-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Update package version
run: |
echo "Updating information for package = ${{ github.event.inputs.package }} version = ${{ github.event.inputs.version }}"
export PKG_NAME_LOWER=$(echo " ${{ github.event.inputs.package }}" | tr '[:upper:]' '[:lower:]')
export PKG_VER=$(echo ${{ github.event.inputs.version }} | sed -e "s/v//g")
DIRS=("base" "swan" "swan-cern")
for DIR in "${DIRS[@]}"; do
sed -i "s/\( $PKG_NAME_LOWER==*\)[^ ]*/\1$PKG_VER/" "$DIR/Dockerfile"
done
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Updated package ${{ github.event.inputs.package }} to version ${{ github.event.inputs.version }}"
branch: '${{ github.event.inputs.package }}-${{ github.event.inputs.version }}'
delete-branch: true
title: "Updated package ${{ github.event.inputs.package }} to version ${{ github.event.inputs.version }}"