Skip to content

Commit

Permalink
regress build instructions for our own use
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ketchel committed Dec 5, 2024
1 parent 591156c commit dbf9113
Showing 1 changed file with 64 additions and 11 deletions.
75 changes: 64 additions & 11 deletions .github/workflows/deploy-to-packagecloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,74 @@ jobs:
format:
name: Get formatted version for filename
uses: WLAN-Pi/gh-workflows/.github/workflows/get-formatted-version-string.yml@main
sbuild_deploy:
name: sbuild deploy pkg
needs:
- format
- check_version
uses: WLAN-Pi/gh-workflows/.github/workflows/sbuild-deploy-pkg.yml@main
with:
pkg: wlanpi-core
version: ${{ needs.format.outputs.version }}
secrets: inherit
sbuild:
name: sbuild ${{ matrix.distro }}+${{ matrix.arch }} pkg
runs-on: "${{ vars.RUNS_ON || 'ubuntu-22.04' }}"
needs: [ format, check_version ]
strategy:
fail-fast: false
matrix:
distro: [ bullseye,bookworm ]
arch: [ arm64 ]
environment: PACKAGECLOUD
steps:
- name: Validate formatted version output
run: |
if [ -z "${{ needs.format.outputs.version }}" ]; then
echo "Error: formatted version output is empty."
exit 1
else
echo "Formatted version output: ${{ needs.format.outputs.version }}"
fi
- name: Get current date
id: date
run: echo "date=$(date -u +'%Y%m%d')" >> $GITHUB_ENV
- name: Gset package filename
run: |
echo "filename=${{ env.debpackagename }}_${{ needs.format.outputs.version }}~gha${{ env.date }}+${{ matrix.arch }}_${{ matrix.distro }}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Validate Environment Variables
run: |
if [ -z "${{ env.debpackagename }}" ]; then
echo "Error: debpackagename cannot be empty"
exit 1
fi
shell: bash
- name: sbuild deb pkg for ${{ matrix.distro }}+${{ matrix.arch }}
uses: wlan-pi/sbuild-debian-package@main
id: build-debian-package
with:
distro: ${{ matrix.distro }}
arch: ${{ matrix.arch }}
- name: Archive artifacts and upload to GitHub
uses: actions/upload-artifact@v4
with:
name: ${{ env.filename }}
path: ${{ steps.build-debian-package.outputs.deb-package }}
- name: Upload armhf pkg to raspbian/${{ matrix.distro }}
if: ${{ matrix.arch == 'armhf' && (github.repository_owner == 'WLAN-Pi') }}
uses: danielmundi/upload-packagecloud@main
with:
package-name: ${{ steps.build-debian-package.outputs.deb-package }}
packagecloud-username: wlanpi
packagecloud-repo: dev
packagecloud-distrib: raspbian/${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}
- name: Upload arm64 pkg to debian/${{ matrix.distro }}
if: ${{ matrix.arch == 'arm64' && (github.repository_owner == 'WLAN-Pi') }}
uses: danielmundi/upload-packagecloud@main
with:
package-name: ${{ steps.build-debian-package.outputs.deb-package }}
packagecloud-username: wlanpi
packagecloud-repo: dev
packagecloud-distrib: debian/${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}
slack-workflow-status:
if: ${{ always() && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
name: Post workflow status to Slack
needs:
- sbuild_deploy
- sbuild
runs-on: "${{ vars.RUNS_ON || 'ubuntu-22.04' }}"
steps:
- name: Slack Workflow Notification
Expand Down

0 comments on commit dbf9113

Please sign in to comment.