Raspberry Pi OS Bullseye 2022-04-07 #17
Workflow file for this run
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: Deploy versioned & latest | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy-release: | |
name: Deploy versioned images | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
shell: bash | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build base image (expanded disk) with latest tag | |
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:bullseye-latest --build-arg FILE_SUFFIX=autologin-ssh-expanded . | |
- name: Tag the base image with the versioned tag | |
run: docker tag ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:bullseye-latest ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }} | |
- name: Build Reduced Disk image | |
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-reduced-disk --build-arg FILE_SUFFIX=autologin-ssh . | |
- name: Build Mu image | |
run: docker build -t ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-mu --build-arg FILE_SUFFIX=mu . | |
- name: Push images to ghcr.io | |
run: | | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-mu | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }}-reduced-disk | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:${{ steps.get_version.outputs.VERSION }} | |
docker push ghcr.io/${{ github.repository_owner }}/qemu-rpi-os-lite:bullseye-latest |