.tar build exploration v2
All checks were successful
Build & Upload tux-dock / build (push) Successful in 7s
All checks were successful
Build & Upload tux-dock / build (push) Successful in 7s
This commit is contained in:
parent
c53d4a98fb
commit
4be73d33da
1 changed files with 13 additions and 12 deletions
|
|
@ -9,32 +9,33 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: [self-hosted]
|
runs-on: [self-hosted]
|
||||||
|
env:
|
||||||
|
BRANCH: ${{ github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Clone current branch
|
- name: Clone current branch
|
||||||
run: |
|
run: |
|
||||||
git clone --branch ${{ github.ref_name }} https://mentalnet.xyz/forgejo/markmental/tuxdock.git .
|
git clone --branch "$BRANCH" https://mentalnet.xyz/forgejo/markmental/tuxdock.git .
|
||||||
echo "✅ Checked out branch ${{ github.ref_name }}"
|
echo "✅ Checked out branch $BRANCH"
|
||||||
|
|
||||||
- name: Compile tux-dock
|
- name: Compile tux-dock
|
||||||
run: |
|
run: |
|
||||||
g++ -std=c++17 main.cpp -o tux-dock
|
g++ -std=c++17 main.cpp -o tux-dock
|
||||||
chmod +x tux-dock
|
chmod +x tux-dock
|
||||||
echo "🎉 tux-dock successfully compiled and marked executable!"
|
echo "🎉 tux-dock compiled and marked executable!"
|
||||||
|
|
||||||
- name: Verify build
|
- name: Verify build
|
||||||
run: file tux-dock
|
run: file tux-dock
|
||||||
|
|
||||||
- name: Package build as tar
|
- name: Prepare build artifact (tarball)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build/${{ github.ref_name }}
|
mkdir -p build/"$BRANCH"
|
||||||
chmod +x tux-dock
|
mv tux-dock build/"$BRANCH"/
|
||||||
mv tux-dock build/${{ github.ref_name }}/
|
tar czf tux-dock-linux-x86_64-"$BRANCH".tar.gz -C build "$BRANCH"
|
||||||
tar czf tux-dock-linux-x86_64-${{ github.ref_name }}.tar.gz -C build ${ { github.ref_name } }
|
echo "📦 Created tux-dock-linux-x86_64-$BRANCH.tar.gz"
|
||||||
echo "📦 Created tarball with preserved permissions"
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tux-dock-linux-x86_64-${{ github.ref_name }}
|
name: tux-dock-linux-x86_64-${{ env.BRANCH }}
|
||||||
path: tux-dock-linux-x86_64-${{ github.ref_name }}.tar.gz
|
path: tux-dock-linux-x86_64-${{ env.BRANCH }}.tar.gz
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue