Changes by create-pull-request action #1784
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: build | |
on: | |
pull_request: | |
types: [labeled] | |
paths: | |
- 'Formula/**.rb' | |
jobs: | |
test-build-bottles: | |
if: "${{ (!contains(github.event.commits[0].message, '[skip ci]')) && (github.event.label.name == 'test') }}" | |
runs-on: macos-13 | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.*' | |
- uses: actions/checkout@v1 | |
- name: Install dependencies | |
working-directory: .github/ansible | |
run: | | |
brew doctor || true | |
brew update || true | |
brew upgrade $(brew outdated --formula -q) || true | |
python -m pip install --upgrade pip | |
pip install -Iq -r requirements.txt | |
- name: Build bottles | |
working-directory: .github/ansible | |
run: ansible-playbook -vvv playbooks/build-bottles.yml | |
build-bottles: | |
if: "${{ (!contains(github.event.commits[0].message, '[skip ci]')) && (github.event.label.name == 'build') }}" | |
runs-on: macos-13 | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- uses: actions/checkout@v1 | |
- name: Install dependencies | |
working-directory: .github/ansible | |
run: | | |
brew doctor || true | |
brew update || true | |
brew upgrade $(brew outdated --formula -q) || true | |
python -m pip install --upgrade pip | |
pip install -Iq -r requirements.txt | |
- name: Build bottles | |
working-directory: .github/ansible | |
run: ansible-playbook -vvv playbooks/build-bottles.yml | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: build | |
upload-bottles: | |
if: "!contains(github.event.commits[0].message, '[skip ci]') && contains( github.event.pull_request.labels.*.name, 'build')" | |
needs: [build-bottles] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- uses: actions/checkout@v1 | |
- name: Install dependencies | |
working-directory: .github/ansible | |
run: | | |
python -m pip install --upgrade pip | |
pip install -Iq -r requirements.txt | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: build | |
path: build | |
- name: Upload Bottles | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: .github/ansible | |
run: ansible-playbook playbooks/upload-bottles.yml | |
update-formulas: | |
if: "!contains(github.event.commits[0].message, '[skip ci]') && contains( github.event.pull_request.labels.*.name, 'build')" | |
needs: [upload-bottles] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Install dependencies | |
working-directory: .github/ansible | |
run: | | |
python -m pip install --upgrade pip | |
pip install -Iq -r requirements.txt | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: build | |
path: build | |
- name: Update Formulas | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: .github/ansible | |
run: ansible-playbook playbooks/update-formulas.yml | |
automerge: | |
if: "!contains(github.event.commits[0].message, '[skip ci]') && contains( github.event.pull_request.labels.*.name, 'build')" | |
needs: [update-formulas] | |
runs-on: ubuntu-latest | |
steps: | |
- id: automerge | |
name: automerge | |
uses: "pascalgn/automerge-action@v0.16.2" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
MERGE_DELETE_BRANCH: true | |