Skip to content

build(debian): 2.2

build(debian): 2.2 #8

Workflow file for this run

name: get Bo, Hamm, Slink & Potato rootfs
env:
DEBIAN_FRONTEND: noninteractive
GET_BASE_DISK_LOG: debug
REG_USER: "robot$debian+bot_actions_2024"
ZSTD_LV: 18
on:
push:
# branches:
# - master
paths:
- ".github/workflows/debian.yml"
jobs:
build:
strategy:
fail-fast: true
matrix:
include:
# - os: debian
# ver: "1.3"
# - os: debian
# ver: "2.0"
# - os: debian
# ver: "2.1"
- os: debain
ver: "2.2"
release_tag: "2.2-base"
tag: base
runs-on: ubuntu-latest
# defaults:
# run:
# shell: zsh -f -e {0}
env:
digests_ron: digests.ron
digests_yaml: digests.yml
build_cmd: get-base-disk --os ${{matrix.os}} --ver ${{matrix.ver}} --tag ${{matrix.tag}}
steps:
- name: update RELEASE_TAG env
run: |
tag=${{matrix.release_tag}}
case $tag in
"") new_tag=${{matrix.ver}};;
*) new_tag=$tag ;;
esac
echo RELEASE_TAG=$new_tag >>$GITHUB_ENV
- name: get-base-disk.bin
run: docker run -i --rm -v /usr/local/bin:/host --pull always reg.tmoe.me:2096/rs/get-base-disk:x64 cp get-base-disk /host
- name: download & repack rootfs
run: ${{env.build_cmd}} --obtain --repack --zstd-level ${{env.ZSTD_LV}}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to REG
uses: docker/login-action@v3
with:
registry: reg.tmoe.me:2096
username: ${{env.REG_USER}}
password: ${{ secrets.REG_TOKEN }}
- name: build container
run: ${{env.build_cmd}} --build
- name: push to ghcr & reg
run: ${{env.build_cmd}} --push
- name: create manifest
run: ${{env.build_cmd}} --create-manifest --update-repo-digest
- name: generate digests.{ron,yml}
run: ${{env.build_cmd}} --digest ${{env.digests_ron}} --digest ${{env.digests_yaml}}
- name: create digests.md
run: |
echo '```yaml' > digests.md
cat tmp/${{env.digests_yaml}} >> digests.md
echo '```' >> digests.md
echo TITLE=$(${{env.build_cmd}} --title | tail -n1) >>$GITHUB_ENV
- name: release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
tag_name: ${{env.RELEASE_TAG}}
name: ${{env.TITLE}}
files: |
tmp/zstd/*.zst
tmp/${{env.digests_ron}}
tmp/${{env.digests_yaml}}
body_path: digests.md