Add branch:tag override syntax in branches.yaml #706
Workflow file for this run
This file contains hidden or 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
| name: Vet | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python dependencies | |
| run: pip install PyYAML | |
| - name: Generate config.yaml | |
| run: python3 generate_config.py | |
| - name: schema validate | |
| uses: nrkno/yaml-schema-validator-github-action@ee8c3b6b405672187eac7cbf2b1c870344661169 # v6.3.0 | |
| with: | |
| schema: schema.yaml | |
| target: config.yaml | |
| duplicates: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python dependencies | |
| run: pip install PyYAML | |
| - name: Generate config.yaml | |
| run: python3 generate_config.py | |
| - uses: mikefarah/yq@751d8ad57b84f1794661bc70c0afb92a22ad7b3c # v4.53.2 | |
| - name: duplicate repository tag check | |
| run: | | |
| OUTPUT=$(yq 'group_by(.target.repository + ":" + .target.tag) | map(select(length>1))' config.yaml) | |
| if [ "$OUTPUT" != "[]" ]; then | |
| echo "Duplicate tag found in config.yaml" | |
| echo $OUTPUT | |
| exit 1 | |
| fi | |
| notify: | |
| name: Discord Notification | |
| runs-on: ubuntu-latest | |
| needs: | |
| - validate | |
| - duplicates | |
| if: failure() | |
| steps: | |
| - name: Notify | |
| uses: nobrayner/discord-webhook@1766a33bf571acdcc0678f00da4fb83aad01ebc7 # v1 | |
| with: | |
| github-token: ${{ secrets.github_token }} | |
| discord-webhook: ${{ secrets.DISCORD_WEBHOOK }} |