Skip to content

Release workflow fix #32

Release workflow fix

Release workflow fix #32

Workflow file for this run

name: Create new release
on:
push:
tags:
- piler*
env:
PROJECT_ID: piler
DISTRO: noble
IMAGE_NAME: sutoj/piler
permissions:
contents: write
jobs:
get-version:
runs-on:
- ubuntu-latest
outputs:
IMAGE_TAG: ${{ steps.get-version.outputs.IMAGE_TAG }}
COMMIT_ID: ${{ steps.get-version.outputs.COMMIT_ID }}
VERSION: ${{ steps.get-version.outputs.VERSION }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
VERSION
.github
sparse-checkout-cone-mode: false
- name: Get version
id: get-version
uses: ./.github/actions/version
build-package:
needs:
- get-version
strategy:
matrix:
arch: ['amd64','arm64']
runs-on:
- ubuntu-latest
outputs:
PACKAGE: ${{ steps.build-package.outputs.PACKAGE }}
steps:
- uses: actions/checkout@v4
- name: Build package
id: build-package
uses: ./.github/actions/build/package
with:
ARCH: ${{ matrix.arch }}
COMMIT_ID: ${{ needs.get-version.outputs.COMMIT_ID }}
DISTRO: ${{ env.DISTRO }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ env.DISTRO }}-${{ matrix.arch }}
PROJECT_ID: 'piler'
VERSION: ${{ needs.get-version.outputs.VERSION }}
build-image:
needs:
- get-version
- build-package
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
uses: ./.github/actions/build/image
with:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ needs.get-version.outputs.VERSION }}
LOAD: false
PACKAGE: ${{ env.PROJECT_ID }}_${{ needs.get-version.outputs.VERSION }}-${{ env.DISTRO }}-${{ needs.get-version.outputs.COMMIT_ID }}
PLATFORMS: 'linux/arm64'
PUSH: true