Skip to content

chore(deps): update golangci/golangci-lint-action action to v5 (#17) #17

chore(deps): update golangci/golangci-lint-action action to v5 (#17)

chore(deps): update golangci/golangci-lint-action action to v5 (#17) #17

Workflow file for this run

name: Labels
on:
push:
branches:
- "main"
permissions: write-all
env:
OWNER: doomshrine
REPO: must
jobs:
upload-labels:
name: Upload labels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- id: labels-changed
run: |
if git diff --name-only HEAD~1 HEAD | grep -q ".github/labels.yaml"; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-go@v5
if: steps.labels-changed.outputs.changed == 'true'
with:
go-version: '1.20'
- if: steps.labels-changed.outputs.changed == 'true'
run: go install github.com/shanduur/labeler/cmd/labeler@main
- if: steps.labels-changed.outputs.changed == 'true'
run: labeler upload --owner ${{ env.OWNER }} --repo ${{ env.REPO }} ./.github/labels.yaml
env:
LABELER_TOKEN: ${{ secrets.LABELER_TOKEN }}