summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-08-20 07:20:09 +0800
committertranch <tranch.xiao@gmail.com>2026-08-20 07:20:09 +0800
commita66fc38e29a79e92cb73fc26626a482fbfc4ec41 (patch)
treec25700bfdd24f33354e935279cf2b9ee43a24973 /.github/workflows/build.yml
parent959986e9d96c65fab30da939005a6880dfa77d52 (diff)
downloadAeroCore-OS-a66fc38e29a79e92cb73fc26626a482fbfc4ec41.tar.gz
AeroCore-OS-a66fc38e29a79e92cb73fc26626a482fbfc4ec41.zip
ci: create GitHub release after image build
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 832b9fa..6ff5963 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,6 +8,11 @@ on:
#schedule:
# - cron: '05 10 * * *' # 10:05am UTC everyday
workflow_dispatch:
+ inputs:
+ handwritten:
+ description: "Small changelog about changes in this build"
+ required: false
+ type: string
env:
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit
@@ -20,6 +25,8 @@ jobs:
build_push:
name: Build and push image
runs-on: ubuntu-24.04
+ outputs:
+ release_tag: ${{ steps.gen-version.outputs.release_tag }}
permissions:
contents: read
@@ -105,6 +112,8 @@ jobs:
echo "ALIAS_TAGS=${ALIAS_TAGS}"
} >> "$GITHUB_ENV"
+ echo "release_tag=${VERSION_TAG}" >> "$GITHUB_OUTPUT"
+
- name: Prepare environment
run: |
# Lowercase the image uri https://github.com/macbre/push-to-ghcr/issues/12
@@ -211,3 +220,15 @@ jobs:
DIGEST: ${{ steps.push-image.outputs.digest }}
run: |
cosign sign -y --key env://COSIGN_PRIVATE_KEY "${IMAGE_REGISTRY}/${IMAGE_NAME}@${DIGEST}"
+
+ generate_release:
+ name: Generate Release
+ needs: [build_push]
+ if: github.event_name != 'pull_request'
+ permissions:
+ contents: write
+ secrets: inherit
+ uses: ./.github/workflows/generate_release.yml
+ with:
+ release_tag: ${{ needs.build_push.outputs.release_tag }}
+ handwritten: ${{ inputs.handwritten }}