diff --git a/.github/workflows/autocancel.yml b/.github/workflows/autocancel.yml new file mode 100644 index 00000000000..c57e3a2030a --- /dev/null +++ b/.github/workflows/autocancel.yml @@ -0,0 +1,18 @@ +name: Cancel previous runs + +on: + schedule: + # Once every 15 minutes + - cron: '*/15 * * * *' + +jobs: + autocancel: + if: github.repository == 'Homebrew/homebrew-core' + runs-on: ubuntu-latest + steps: + - name: Cancel + uses: Homebrew/actions/cancel-previous-runs@master + with: + token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} + workflow: tests.yml + event: pull_request diff --git a/.github/workflows/autolabel.yml b/.github/workflows/autolabel.yml new file mode 100644 index 00000000000..412bec51e92 --- /dev/null +++ b/.github/workflows/autolabel.yml @@ -0,0 +1,28 @@ +name: Label pull requests + +on: + schedule: + # Once every 30 minutes + - cron: '*/30 * * * *' + +jobs: + autolabel: + if: github.repository == 'Homebrew/homebrew-core' + runs-on: ubuntu-latest + steps: + - name: Label + uses: Homebrew/actions/label-pull-requests@master + with: + token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} + def: | + [ + { + "label": "new formula", + "status": "added", + "path": "Formula/.+" + }, { + "label": "marked for removal/rejection", + "status": "removed", + "path": "Formula/.+" + } + ] diff --git a/.github/workflows/scheduled.yml b/.github/workflows/autopublish.yml similarity index 75% rename from .github/workflows/scheduled.yml rename to .github/workflows/autopublish.yml index fc4fff20c61..865f878eb44 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/autopublish.yml @@ -1,4 +1,4 @@ -name: Scheduled tasks +name: Publish and commit bottles on schedule on: schedule: @@ -15,10 +15,8 @@ jobs: HOMEBREW_FORCE_HOMEBREW_ON_LINUX: 1 steps: - name: Update Homebrew - run: | - brew update-reset $(brew --repo) + run: brew update-reset $(brew --repo) - name: Run automerge env: HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - run: | - brew pr-automerge --verbose --publish + run: brew pr-automerge --verbose --publish