In sbin/rear make it clear when ReaR's TMP_DIR is used #451
Workflow file for this run
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 Packages | |
on: push | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: setup | |
run: sudo apt-get -qq update && sudo apt-get -qq install asciidoctor | |
- id: prepare | |
run: tools/run-in-docker -- --patch | |
- id: dist | |
run: make dist | |
- id: build | |
run: tools/run-in-docker -- 'make package || tar -cvzf dist-all/build-$HOSTNAME.tar.gz /var/tmp/build-rear*' | |
- run: ls -lR dist-all | |
if: always() | |
- name: Upload Artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ReaR Packages ${{ github.head_ref || github.ref_name }} ${{ github.sha }} | |
path: dist-all/* | |
retention-days: 7 | |
- name: Create Release Archives and Update GitHub Release | |
if: github.ref == 'refs/heads/master' | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
# | |
set -e | |
# put commit details into ZIP comment as the files allways have the same names | |
COMMENT=$(git show -s --format="ReaR snapshot %h %ci%nhttps://github.com/rear/rear/tree/%H") | |
for distro in dist-all/* ; do | |
test -d "$distro" || continue | |
zip -0 -j -z "$distro.zip" "$distro"/* <<< "$COMMENT" | |
done | |
gh release delete snapshot -y || : | |
git push --delete origin snapshot || : | |
gh release create snapshot \ | |
--target ${{ github.sha }} \ | |
--title "ReaR Snapshot $(git show -s --format="%ci")" \ | |
--notes "Automatically built installation packages for testing purposes" \ | |
dist-all/*.zip dist/*.tar.gz |