Fix distributions test github workflow v4 #163
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: Build Linuxloops Live Disk | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'linuxloops' | |
- '.github/workflows/live.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-live-disk: | |
name: Build Linuxloops Live Disk | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout linuxloops script | |
uses: actions/checkout@v4 | |
- name: Set current date | |
run: echo "current_date=$(date '+%Y%m%d')" >> $GITHUB_ENV | |
- name: Build Linuxloops Live Disk | |
run: sudo bash linuxloops -distro Debian -ver Bookworm -env Cinnamon -dst linuxloops_live_${{ env.current_date }}.img -u -a -b -c "file-roller firefox-esr gedit gparted evince python3-venv python3-pyqt6.qtwebengine" -H "linuxloops" | |
- name: Compress Linuxloops Live Disk | |
run: 7z a linuxloops_live_${{ env.current_date }}.7z linuxloops_live_${{ env.current_date }}.img | |
- name: Generate release details | |
run: | | |
RELEASE_FILE=linuxloops_live_${{ env.current_date }}.7z | |
RELEASE_VERSION=$(echo "$RELEASE_FILE" | cut -d'.' -f1 | cut -d'_' -f2) | |
RELEASE_DATE=$(echo "$RELEASE_FILE" | cut -d'.' -f1 | cut -d'_' -f3) | |
echo "Found linuxloops release: ${RELEASE_FILE} with version ${RELEASE_VERSION} and date ${RELEASE_DATE}" | |
echo "RELEASE_FILE=${RELEASE_FILE}" >> $GITHUB_ENV | |
echo "RELEASE_TAG=linuxloops-${RELEASE_VERSION}-${RELEASE_DATE}" >> $GITHUB_ENV | |
echo "RELEASE_NAME=Linuxloops ${RELEASE_VERSION} ${RELEASE_DATE}" >> $GITHUB_ENV | |
echo "RELEASE_SHA256=$(sha256sum $RELEASE_FILE | cut -d' ' -f1)" >> $GITHUB_ENV | |
- name: Create a release and upload artifacts as assets | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "${{ env.RELEASE_FILE }}" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
tag: "${{ env.RELEASE_TAG }}" | |
name: "${{ env.RELEASE_NAME }}" | |
commit: "${{ github.ref_name }}" | |
body: "${{ github.event.head_commit.message }}\n\nrelease_sha256sum=${{ env.RELEASE_SHA256 }}\n" |