Skip to content

Deploy Repo and Firmware #19

Deploy Repo and Firmware

Deploy Repo and Firmware #19

Workflow file for this run

name: Deploy Repo and Firmware
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install required packages
run: |
until sudo apt update
do
sleep 1
done
sudo apt install -y jq createrepo-c coreutils gnupg2 dpkg-dev
- name: Insert environment variables
run: |
echo GNUPGHOME="$(mktemp -d /tmp/pgpkeys-XXXXXX)" >> $GITHUB_ENV
echo REPO_OWNER="$(echo "${GITHUB_REPOSITORY}" | cut -d/ -f1)" >> $GITHUB_ENV
echo REPO_NAME="$(echo "${GITHUB_REPOSITORY}" | cut -d/ -f2)" >> $GITHUB_ENV
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.PRIVATE_SIGNING_KEY }}
- name: Confirm GPG Key loaded
run: |
gpg --list-keys
echo "${{ steps.import_gpg.outputs.fingerprint }}"
- name: Delete existing deb directory
run: |
rm -rf deb
- name: Build DEB Repository (stable)
run: |
export GPG_FINGERPRINT="${{ steps.import_gpg.outputs.fingerprint }}"
export ORIGIN="${{ steps.import_gpg.outputs.name }}"
.github/scripts/build_repo.sh
- name: Build DEB Repository (unstable)
run: |
export SUITE="unstable"
export GPG_FINGERPRINT="${{ steps.import_gpg.outputs.fingerprint }}"
export ORIGIN="${{ steps.import_gpg.outputs.name }}"
.github/scripts/build_repo.sh
- name: Fetch release zips and unpack them
run: |
export ARTIFACTS_TOKEN="${{ secrets.ARTIFACTS_TOKEN }}"
.github/scripts/fetch_release.sh
- name: Upload to original repo
uses: EndBug/add-and-commit@v9
with:
add: '["deb", "firmware-*/*"]'