54 lines
1.7 KiB
YAML
54 lines
1.7 KiB
YAML
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2021-present 351ELEC
|
|
# Copyright (C) 2022-present Fewtarius
|
|
|
|
### Based on work by @pkegg
|
|
|
|
name: build-dev
|
|
on:
|
|
repository_dispatch:
|
|
types: [release-dev]
|
|
|
|
concurrency:
|
|
group: dev
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 1440
|
|
runs-on: dev
|
|
steps:
|
|
- uses: hmarr/debug-action@v2
|
|
name: debug
|
|
- name: get current branch as it may not be 'default branch;
|
|
id: branch
|
|
run: |
|
|
branch_arg="${{ github.event.client_payload.branch }}"
|
|
if [[ -z "$branch_arg" ]]; then
|
|
branch_arg="$GITHUB_REF_NAME"
|
|
fi
|
|
echo "branch=$branch_arg" >> $GITHUB_OUTPUT
|
|
- uses: actions/checkout@v3
|
|
name: checkout
|
|
with:
|
|
clean: false
|
|
ref: "${{ steps.branch.outputs.branch }}"
|
|
- name: Get date for artifacts
|
|
id: date
|
|
run: echo "date=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
|
|
- name: Get short SHA for artifacts
|
|
id: sha
|
|
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
- name: Get dev version
|
|
id: version
|
|
run: |
|
|
set -e
|
|
echo "full name: ${{ github.event.repository.full_name }}"
|
|
if [[ "${{ github.event.client_payload.release_tag }}" != "" ]]; then
|
|
echo "version=${{ github.event.client_payload.release_tag }}" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "version=${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}" >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Build World
|
|
run: |
|
|
set -e
|
|
CUSTOM_VERSION="${{ steps.version.outputs.version }}" DOCKER_WORK_DIR="/work" DOCKER_EXTRA_OPTS="-v /buildroot:/buildroot" make docker-world
|