Deployment #490
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: "Deployment" | |
on: | |
workflow_run: | |
workflows: ["CI"] | |
branches: [master, develop] | |
types: | |
- completed | |
jobs: | |
build: | |
name: Build | |
runs-on: warp-ubuntu-latest-x64-2x | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.workflow_run.head_branch }} | |
fetch-depth: 0 | |
- name: Setup Pakman | |
uses: upmaru/pakman@v8 | |
with: | |
alpine: v3.18 | |
- name: Bootstrap Configuration | |
run: | | |
pakman bootstrap | |
shell: alpine.sh {0} | |
env: | |
ABUILD_PRIVATE_KEY: ${{secrets.ABUILD_PRIVATE_KEY}} | |
ABUILD_PUBLIC_KEY: ${{secrets.ABUILD_PUBLIC_KEY}} | |
- name: "Build Package" | |
run: | | |
cd "$GITHUB_WORKSPACE"/.apk/"$GITHUB_REPOSITORY" || exit | |
abuild snapshot | |
abuild -r | |
shell: alpine.sh {0} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ runner.arch }} | |
path: /home/runner/packages | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: warp-ubuntu-latest-x64-2x | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.workflow_run.head_branch }} | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /home/runner/artifacts | |
- name: Setup Pakman | |
uses: upmaru/pakman@v8 | |
with: | |
alpine: v3.18 | |
- name: Merge Artifact | |
run: | | |
cp -R /home/runner/artifacts/X64/. /home/runner/packages/ | |
sudo zip -r /home/runner/packages.zip "$HOME"/packages | |
shell: alpine.sh {0} | |
- name: Push | |
run: pakman push | |
shell: alpine.sh {0} | |
env: | |
WORKFLOW_REF: ${{ github.event.workflow_run.head_branch }} | |
WORKFLOW_SHA: ${{ github.event.workflow_run.head_sha }} | |
INSTELLAR_ENDPOINT: ${{vars.INSTELLAR_ENDPOINT}} | |
INSTELLAR_PACKAGE_TOKEN: ${{secrets.INSTELLAR_PACKAGE_TOKEN}} | |
INSTELLAR_AUTH_TOKEN: ${{secrets.INSTELLAR_AUTH_TOKEN}} |