Lygisk CI #1287
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: Lygisk CI | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: lygisk-ci | |
cancel-in-progress: false | |
jobs: | |
automerge-stable: | |
uses: ./.github/workflows/automerge.yml | |
with: | |
branch: stable | |
automerge-beta: | |
uses: ./.github/workflows/automerge.yml | |
with: | |
branch: beta | |
automerge-canary: | |
uses: ./.github/workflows/automerge.yml | |
with: | |
branch: canary | |
automerge-madness: | |
uses: ./.github/workflows/automerge.yml | |
with: | |
branch: madness | |
build-stable: | |
needs: automerge-stable | |
if: needs.automerge-stable.outputs.changed == 'true' | |
uses: ./.github/workflows/build.yml | |
with: | |
branch: stable | |
secrets: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }} | |
build-beta: | |
needs: automerge-beta | |
if: needs.automerge-beta.outputs.changed == 'true' | |
uses: ./.github/workflows/build.yml | |
with: | |
branch: beta | |
secrets: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }} | |
build-canary: | |
needs: automerge-canary | |
if: needs.automerge-canary.outputs.changed == 'true' | |
uses: ./.github/workflows/build.yml | |
with: | |
branch: canary | |
secrets: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }} | |
build-madness: | |
needs: automerge-madness | |
if: needs.automerge-madness.outputs.changed == 'true' | |
uses: ./.github/workflows/build.yml | |
with: | |
branch: madness | |
secrets: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }} | |
deploy: | |
if: always() | |
needs: [ | |
build-stable, build-beta, build-canary, build-madness, | |
automerge-stable, automerge-beta, automerge-canary, automerge-madness | |
] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: [ stable, beta, canary, madness ] | |
fail-fast: false | |
max-parallel: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/deploy | |
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true' | |
with: | |
branch: ${{ matrix.branch }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true' | |
with: | |
ref: ci-build-${{ matrix.branch }} | |
fetch-depth: 0 | |
- name: Setup git | |
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true' | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Update CI master sha | |
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true' | |
run: | | |
echo "${{ needs[format('automerge-{0}', matrix.branch)].outputs.basesha }}" > ci-master-sha.txt | |
git add ci-master-sha.txt | |
git commit -m "save master base commit sha" | |
- name: Push result | |
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true' | |
uses: ad-m/github-push-action@v0.8.0 | |
with: | |
force_with_lease: true | |
- uses: actions/checkout@v4 | |
# need to checkout default branch again, for the post-run hooks of the composite deploy action to work |