Beta Release #1
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
name: Beta Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Beta version tag (1, 2, 3, ...)" | |
required: true | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
outputs: | |
tagname: ${{ steps.create_tag.outputs.tagname }} | |
os_version: ${{ steps.get_version.outputs.os_version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get os version | |
id: get_version | |
run: | | |
version=$(grep -oP '^RUNTIPI_OS_VERSION=\K[^ ]+' config) | |
echo "os_version=${version}" >> $GITHUB_OUTPUT | |
- name: Create tag | |
id: create_tag | |
run: | | |
echo "tagname=v${{ steps.get_version.outputs.os_version }}-beta.${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT | |
- uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: ${{ steps.create_tag.outputs.tagname }} | |
build-image: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install apt requirements | |
run: sudo apt install coreutils quilt parted qemu-user-static debootstrap zerofree zip dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc qemu-utils kpartx gpg pigz sed -y | |
- name: Build Image | |
run: ./build-docker.sh | |
- name: Upload the image | |
uses: actions/upload-artifact@v3 | |
with: | |
name: image | |
path: deploy/ | |
publish-release: | |
runs-on: ubuntu-latest | |
needs: [create-tag, build-image] | |
steps: | |
- name: Download image | |
uses: actions/download-artifact@v3 | |
with: | |
name: image | |
path: image/ | |
- name: Get image name | |
id: get_img | |
run: | | |
image=$(find image/ -iname *.zip) | |
echo "img_name=${image}" >> $GITHUB_OUTPUT | |
- name: Rename image | |
run: | | |
mv ${{ steps.get_img.outputs.img_name }} ./runtipi-os-${{ needs.create-tag.outputs.os_version }}.zip | |
- name: Create alpha release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body: | | |
**${{ needs.create-tag.outputs.tagname }}** | |
tag_name: ${{ needs.create-tag.outputs.tagname }} | |
name: ${{ needs.create-tag.outputs.tagname }} | |
draft: false | |
prerelease: true | |
files: | | |
runtipi-os-${{ needs.create-tag.outputs.os_version }}.zip |