Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add archive release type #49

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/BuildTrain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Train
on:
# on every monday at 3:30
schedule:
- cron: '30 3 * * 1'
- cron: "30 3 * * 1"

# build a new release on push a new config file
push:
Expand All @@ -13,6 +13,10 @@ on:

# enable manual start of this workflow
workflow_dispatch:
inputs:
archive-release:
type: boolean
description: Release as archived version?

# Allow to stop obsolete workflows
concurrency:
Expand Down Expand Up @@ -67,7 +71,7 @@ jobs:
shell: bash
run: |
source ./build-configs/configs/config-default.conf

echo "armbian_repository=${ARMBIAN_REPOSITORY}" >> $GITHUB_OUTPUT
echo "armbian_branch=${ARMBIAN_BRANCH}" >> $GITHUB_OUTPUT

Expand All @@ -90,14 +94,27 @@ jobs:
id: time
uses: nanzm/get-time-action@v2.0
with:
format: 'YYYYMMDD-HHmm'
format: "YYYYMMDD-HHmm"

- name: Set release type
id: release-type
run: |
version="${{ steps.armbian-version.outputs.version }}"
time="${{ steps.time.outputs.time }}"
if [[ ${{ inputs.archive-release }} = "true" ]]; then
echo "name=archive-${version}-${time}" >> $GITHUB_OUTPUT
echo "time=${time}" >> $GITHUB_OUTPUT
else
echo "name=${version}-${time}" >> $GITHUB_OUTPUT
echo "time=${time}" >> $GITHUB_OUTPUT
fi

- name: Create empty release
id: release
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.armbian-version.outputs.version }}-${{ steps.time.outputs.time }}
tag_name: ${{ steps.time.outputs.time }}
name: ${{ steps.release-type.outputs.name }}
tag_name: ${{ steps.release-type.outputs.time }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true

Expand Down Expand Up @@ -173,7 +190,7 @@ jobs:

build-orangepi:
name: Orangepi
needs: [ setup, release ]
needs: [setup, release]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down