Update for Heroku 24 Stack #18
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 Nginx for Heroku Stacks | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build20-22: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [heroku-20, heroku-22] | |
steps: | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run Makefile target | |
run: | | |
make build-${{ matrix.target }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: | | |
${{ matrix.target }}.tgz | |
path: ./*.tgz | |
build24: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [heroku-24] | |
arch: [amd64, arm64] | |
steps: | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run Makefile target | |
run: | | |
make build-${{ matrix.target }}-${{ matrix.arch }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: | | |
${{ matrix.target }}-${{ matrix.arch }}.tgz | |
path: ./*.tgz | |
commit: | |
runs-on: ubuntu-latest | |
needs: [build24, build20-22] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download build artifacts | |
run: ls -R | |
- uses: actions/download-artifact@v4 | |
with: | |
path: . | |
- name: Commit and push artifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add *.tgz | |
git commit -m "Add nginx builds for Heroku stacks on multiple architectures" | |
git push |