Create PR to update api-dummy image to latest #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: '* * * * *' | |
jobs: | |
update-api-dummy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: update | |
name: Check for api-dummy updates | |
continue-on-error: true | |
run: ./bin/update-api-dummy | |
- id: image | |
if: steps.update.outcome == 'success' | |
name: get latest image | |
run: echo "tag=$(cat docker-compose.yaml | yq '.services["api-dummy"].image|split(":")[1]')" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
if: steps.update.outcome == 'success' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
add-paths: docker-compose.yaml | |
commit-message: Update api-dummy docker image to ${{ steps.image.outputs.tag }} | |
branch: update-api-dummy | |
title: Update api-dummy docker image to ${{ steps.image.outputs.tag }} | |
body: | | |
Update the api-dummy docker image used in docker-compose to the latest image ${{ steps.image.outputs.tag }} |