Skip to content

Build All

Build All #72

Workflow file for this run

name: Build All
on:
workflow_dispatch:
jobs:
check-release:
runs-on: ubuntu-latest
outputs:
new-version: ${{ steps.version.outputs.TAG }}
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Fetch Current Release
id: version
run: |
TAG=$(./pi-imager/fetch-image.sh -v | grep -Po "[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}")
CURRENT=$(jq ".builders[0].file_urls[0]" pi-imager/raspios.json | grep -Po "[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}" | head -n1)
echo "current version: $CURRENT"
echo "available version: $TAG"
[ ${TAG} != ${CURRENT} ] && TAG="true"
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
update-version:
needs: check-release
if: ${{ needs.check-release.outputs.new-version }} == "testing"
runs-on: ubuntu-latest
steps:
- name: Install moreutils
run: sudo apt-get update -y && sudo apt-get install -y moreutils
- name: Checkout Repository
uses: actions/checkout@master
- name: Update Templates
run: cd pi-imager && ./fetch-image.sh -u
- name: Commit Version Bump
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated Version Bump
ssh:
needs: update-version
uses: ./.github/workflows/packer.yaml
with:
imageType: ssh-enabled
docker:
needs: update-version
uses: ./.github/workflows/packer.yaml
with:
imageType: docker-host
kube:
needs: update-version
uses: ./.github/workflows/packer.yaml
with:
imageType: kube-worker
release:
needs: [ssh, docker, kube]
uses: ./.github/workflows/release.yaml