Skip to content

Bump gix from 0.68.0 to 0.69.1 #192

Bump gix from 0.68.0 to 0.69.1

Bump gix from 0.68.0 to 0.69.1 #192

name: Auto-Label New Language PRs
on:
pull_request:
branches: [main]
jobs:
compare:
name: Compare Languages
runs-on: ubuntu-latest
outputs:
should-label: ${{ steps.compare.outputs.should-label }}
steps:
- name: Fetch current languages.yaml
uses: actions/checkout@v4
with:
path: old
ref: ${{ github.event.pull_request.base.sha }}
sparse-checkout: gengo/languages.yaml
sparse-checkout-cone-mode: false
clean: false
- name: Fetch updated languages.yaml
uses: actions/checkout@v4
with:
path: new
ref: ${{ github.event.pull_request.head.sha }}
sparse-checkout: gengo/languages.yaml
sparse-checkout-cone-mode: false
clean: false
- name: Checkout scripts
uses: actions/checkout@v4
with:
path: scripts
sparse-checkout: scripts/
sparse-checkout-cone-mode: false
clean: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Compare languages
run: (ruby ./scripts/scripts/should-tag-new-language.rb old/gengo/languages.yaml new/gengo/languages.yaml && echo "should-label=true" || echo "should-label=false") >> "$GITHUB_OUTPUT"
id: compare
shell: bash
label:
name: Label PR
runs-on: ubuntu-latest
permissions:
pull-requests: write
needs:
- compare
if: ${{ needs.compare.outputs.should-label == 'true' }}
steps:
- run: gh pr edit $PR_URL --add-label "$PR_LABEL"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_LABEL: new-language