This repository has been archived by the owner on May 8, 2024. It is now read-only.
release-dev #875
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: GPL-2.0-or-later | |
# Copyright (C) 2021-present 351ELEC | |
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | |
### 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 >/tmp/build.log 2>&1 |