Skip to content

chore(gateway): Fix tags #158

chore(gateway): Fix tags

chore(gateway): Fix tags #158

Workflow file for this run

name: Update Dummy workflow
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "actions.yml"
pull_request:
paths:
- ".github/workflows/update_dummy.yml"
- "actions.yml"
- gateway/*
permissions: {}
# We want workflows on main to run in order to avoid losing data through race conditions
concurrency: "${{ github.ref }}-${{ github.workflow }}"
jobs:
update:
name: Update Workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: true
# We have to use a PAT to commit the workflow file
token: ${{ secrets.ALLOWLIST_WORKFLOW_TOKEN || github.token }}
- run: pip install ruyaml
- name: Update Workflow
shell: python
run: |
import sys
sys.path.append("./gateway/")
import gateway as g
g.update_workflow(".github/workflows/dummy.yml", "actions.yml")
g.update_patterns("approved_patterns.yml", "actions.yml")
- name: Commit and push changes
if: ${{ github.event_name != 'pull_request' }}
run: |
git config --local user.name "asfgit"
git config --local user.email "[email protected]"
git add -f .github/workflows/dummy.yml approved_patterns.yml
git commit -m "Update approved_patterns.yml and .github/workflows/dummy.yml based on actions.yml" -m "Generated by .github/workflows/update_dummy.yml" || echo "No changes"
git push origin