Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

feat: initial implementation (#1) #1

feat: initial implementation (#1)

feat: initial implementation (#1) #1

Workflow file for this run

name: Upload labels
on:
push:
branches:
- "main"
permissions: write-all
env:
OWNER: doomshrine
REPO: gocosi
jobs:
upload-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
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@v4
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 }}