distribution/.github/workflows/build-dev.yaml

55 lines
1.8 KiB
YAML
Raw Normal View History

2022-04-10 19:51:34 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present 351ELEC
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
2022-04-10 19:51:34 +00:00
### 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
2023-01-02 14:15:27 +00:00
echo "branch=$branch_arg" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
2022-04-10 19:51:34 +00:00
name: checkout
with:
clean: false
ref: "${{ steps.branch.outputs.branch }}"
- name: Get date for artifacts
id: date
2023-01-02 14:15:27 +00:00
run: echo "date=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
2022-04-10 19:51:34 +00:00
- name: Get short SHA for artifacts
id: sha
2023-01-02 14:15:27 +00:00
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
2022-04-10 19:51:34 +00:00
- 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
2023-01-02 14:15:27 +00:00
echo "version=${{ github.event.client_payload.release_tag }}" >> $GITHUB_OUTPUT
2022-04-10 19:51:34 +00:00
else
2023-01-02 14:15:27 +00:00
echo "version=${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}" >> $GITHUB_OUTPUT
2022-04-10 19:51:34 +00:00
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 >/tmp/build.log 2>&1