Skip to content

Update Mojaloop image tags (push) - #11

Update Mojaloop image tags (push) -

Update Mojaloop image tags (push) - #11

Workflow file for this run

name: Update Mojaloop image tags
run-name: Update Mojaloop image tags (${{ github.event.inputs.tag || github.event_name }}) - ${{ github.event.inputs.image }}
on:
workflow_dispatch:
inputs:
image:
description: Published image
default: '*'
tag:
description: Updated tag
upstream:
description: Upstream job URL
push:
branches:
- main
paths:
- updatecli.d/*
schedule:
- cron: '0 0 * * *'
permissions:
contents: write
pull-requests: write
jobs:
updatecli:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install updatecli
uses: updatecli/updatecli-action@v2
- name: Update image tags
run: |
echo "Updating Mojaloop image tags:" > update.log
echo "${{ github.event.inputs.upstream }}" > update.log
updatecli apply |& tee /dev/tty | grep -o '[^.]*\.image\.tag" updated from .*,' | sed -e 's/[",]//g;s/^/- /' >> update.log
- name: Create pull request
id: create_pr
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update Mojaloop image tags (${{ github.event.inputs.tag || github.event_name }}) - ${{ github.event.inputs.image }}
title: Update Mojaloop image tags (${{ github.event.inputs.tag || github.event_name }}) - ${{ github.event.inputs.image }}
body-path: update.log
- name: Auto merge pull request
if: steps.create_pr.outputs.pull-request-number && github.event_name != 'push'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }}
merge-method: squash
token: ${{ secrets.MERGE_TOKEN }}