Skip to content

update-sync-param-files #4

update-sync-param-files

update-sync-param-files #4

name: update-sync-param-files
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
update-sync-param-files:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Check out repository
uses: actions/checkout@v3
- name: Install GitPython
run: |
pip3 install GitPython
shell: bash
- name: Generate sync-param-files.yaml
run: |
python3 .github/update-sync-param-files.py .github/sync-param-files.yaml
- name: Create PR
id: create-pr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.generate-token.outputs.token }}
base: ${{ github.event.repository.default_branch }}
branch: update-sync-param-files
title: "chore: update sync-param-files.yaml"
commit-message: "chore: update sync-param-files.yaml"
body: ${{ steps.create-pr-body.outputs.body }}
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"
shell: bash
- name: Enable auto-merge
if: ${{ steps.create-pr.outputs.pull-request-operation == 'created' }}
run: gh pr merge --squash --auto "${{ steps.create-pr.outputs.pull-request-number }}"
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}