Update sbt-ci-release to 1.8.0 #60
Workflow file for this run
This file contains 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: Label PR | |
on: | |
pull_request_target: {} | |
jobs: | |
update-pr-labels: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
outputs: | |
labels: ${{ steps.get-pr-labels.outputs.value }} | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: srvaroa/labeler@v1 | |
- run: gh pr view --json labels $PR_URL > pr-labels.json | |
- id: get-pr-labels | |
uses: sergeysova/jq-action@v2 | |
with: | |
cmd: cat pr-labels.json | jq -c '.labels | map(.name)' | |
auto-approve: | |
needs: update-pr-labels | |
runs-on: ubuntu-latest | |
if: contains(fromJSON(needs.update-pr-labels.outputs.labels), 'auto-approve') | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: hmarr/auto-approve-action@v3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-auto-merge: | |
needs: update-pr-labels | |
runs-on: ubuntu-latest | |
if: contains(fromJSON(needs.update-pr-labels.outputs.labels), 'automerge') | |
permissions: | |
contents: write | |
steps: | |
- run: gh pr merge --merge --auto "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |