generated from netbootxyz/iso-extraction-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9989331
commit 6e3a752
Showing
2 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: q4os-plasma | ||
|
||
on: | ||
push: | ||
branches: | ||
- q4os-plasma | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
schedule: | ||
- cron: '0 4 * * 5' | ||
workflow_dispatch: | ||
|
||
env: | ||
BRANCH: q4os-plasma | ||
GITHUB_ENDPOINT: netbootxyz/debian-squash | ||
DISCORD_HOOK_URL: ${{ secrets.DISCORD_HOOK_URL }} | ||
BUILD_TYPE: iso_extraction | ||
DEBIAN_FRONTEND: noninteractive | ||
CI_TOKEN: ${{ secrets.CI_TOKEN }} | ||
|
||
jobs: | ||
version-checker: | ||
name: Version Checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: q4os-plasma | ||
|
||
- name: Get SHA of actual branch instead of master | ||
run: | | ||
export GITHUB_SHA=$(git rev-parse HEAD) | ||
echo "GITHUB_SHA=$GITHUB_SHA" >> $GITHUB_ENV | ||
- name: Retrieve latest version from upstream and set vars | ||
run: | | ||
export EXTERNAL_VERSION=$(sudo bash version.sh) | ||
echo "EXTERNAL_VERSION=$EXTERNAL_VERSION" >> $GITHUB_ENV | ||
export GITHUB_TAG=${EXTERNAL_VERSION}-$(echo ${{ env.GITHUB_SHA }} | cut -c1-8) | ||
echo "GITHUB_TAG=$GITHUB_TAG" >> $GITHUB_ENV | ||
wget https://raw.githubusercontent.com/netbootxyz/build-pipelines/master/build.sh && chmod +x build.sh | ||
- name: Compare tag | ||
id: compare | ||
run: ./build.sh compare ${{ env.GITHUB_TAG }} | ||
continue-on-error: true | ||
|
||
- name: Build if newer tag is available | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' | ||
run: | | ||
./build.sh build ${{ env.BUILD_TYPE }} | ||
git tag ${{ env.GITHUB_TAG }} | ||
- name: Generate Release Notes | ||
run: | | ||
echo "Release generated for Branch: **${{ env.BRANCH }}**" > ${{ github.workspace }}-CHANGELOG.txt | ||
- name: Create release and upload assets | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.GITHUB_TAG }} | ||
name: ${{ env.GITHUB_TAG }} | ||
draft: false | ||
prerelease: false | ||
files: buildout/* | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body_path: ${{ github.workspace }}-CHANGELOG.txt | ||
|
||
- name: Generate endpoints | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' | ||
run: | | ||
git config --global user.name netboot-ci | ||
git config --global user.email netboot-ci@netboot.xyz | ||
./build.sh endpoints ${{ env.GITHUB_TAG }} | ||
- name: Notify Discord on failure | ||
if: failure() | ||
run: | | ||
./build.sh discord failure | ||
- name: Notify Discord on completion | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' && success() | ||
run: | | ||
./build.sh discord success |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: q4os | ||
|
||
on: | ||
push: | ||
branches: | ||
- q4os | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
schedule: | ||
- cron: '0 4 * * 5' | ||
workflow_dispatch: | ||
|
||
env: | ||
BRANCH: q4os | ||
GITHUB_ENDPOINT: netbootxyz/debian-squash | ||
DISCORD_HOOK_URL: ${{ secrets.DISCORD_HOOK_URL }} | ||
BUILD_TYPE: initrd_patch | ||
DEBIAN_FRONTEND: noninteractive | ||
CI_TOKEN: ${{ secrets.CI_TOKEN }} | ||
|
||
jobs: | ||
version-checker: | ||
name: Version Checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: q4os | ||
|
||
- name: Get SHA of actual branch instead of master | ||
run: | | ||
export GITHUB_SHA=$(git rev-parse HEAD) | ||
echo "GITHUB_SHA=$GITHUB_SHA" >> $GITHUB_ENV | ||
- name: Retrieve latest version from upstream and set vars | ||
run: | | ||
export EXTERNAL_VERSION=$(sudo bash version.sh) | ||
echo "EXTERNAL_VERSION=$EXTERNAL_VERSION" >> $GITHUB_ENV | ||
export GITHUB_TAG=${EXTERNAL_VERSION}-$(echo ${{ env.GITHUB_SHA }} | cut -c1-8) | ||
echo "GITHUB_TAG=$GITHUB_TAG" >> $GITHUB_ENV | ||
wget https://raw.githubusercontent.com/netbootxyz/build-pipelines/master/build.sh && chmod +x build.sh | ||
- name: Compare tag | ||
id: compare | ||
run: ./build.sh compare ${{ env.GITHUB_TAG }} | ||
continue-on-error: true | ||
|
||
- name: Build if newer tag is available | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' | ||
run: | | ||
./build.sh build ${{ env.BUILD_TYPE }} | ||
git tag ${{ env.GITHUB_TAG }} | ||
- name: Generate Release Notes | ||
run: | | ||
echo "Release generated for Branch: **${{ env.BRANCH }}**" > ${{ github.workspace }}-CHANGELOG.txt | ||
- name: Create release and upload assets | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.GITHUB_TAG }} | ||
name: ${{ env.GITHUB_TAG }} | ||
draft: false | ||
prerelease: false | ||
files: buildout/* | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body_path: ${{ github.workspace }}-CHANGELOG.txt | ||
|
||
- name: Generate endpoints | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' | ||
run: | | ||
git config --global user.name netboot-ci | ||
git config --global user.email netboot-ci@netboot.xyz | ||
./build.sh endpoints ${{ env.GITHUB_TAG }} | ||
- name: Notify Discord on failure | ||
if: failure() | ||
run: | | ||
./build.sh discord failure | ||
- name: Notify Discord on completion | ||
if: steps.compare.outcome == 'success' && steps.compare.conclusion == 'success' && success() | ||
run: | | ||
./build.sh discord success |