diff --git a/.github/workflows/grml-full.yml b/.github/workflows/grml-full-amd64.yml similarity index 96% rename from .github/workflows/grml-full.yml rename to .github/workflows/grml-full-amd64.yml index 83ad1c1..34e6b95 100644 --- a/.github/workflows/grml-full.yml +++ b/.github/workflows/grml-full-amd64.yml @@ -1,9 +1,9 @@ -name: grml-full +name: grml-full-amd64 on: push: branches: - - grml-full + - grml-full-amd64 paths-ignore: - '.github/workflows/**' schedule: @@ -11,7 +11,7 @@ on: workflow_dispatch: env: - BRANCH: grml-full + BRANCH: grml-full-amd64 GITHUB_ENDPOINT: netbootxyz/debian-squash DISCORD_HOOK_URL: ${{ secrets.DISCORD_HOOK_URL }} BUILD_TYPE: initrd_patch @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: grml-full + ref: grml-full-amd64 - name: Get SHA of actual branch instead of master run: | diff --git a/.github/workflows/grml-small.yml b/.github/workflows/grml-full-arm64.yml similarity index 96% rename from .github/workflows/grml-small.yml rename to .github/workflows/grml-full-arm64.yml index e71e1db..44c5eed 100644 --- a/.github/workflows/grml-small.yml +++ b/.github/workflows/grml-full-arm64.yml @@ -1,9 +1,9 @@ -name: grml-small +name: grml-full-arm64 on: push: branches: - - grml-small + - grml-full-arm64 paths-ignore: - '.github/workflows/**' schedule: @@ -11,7 +11,7 @@ on: workflow_dispatch: env: - BRANCH: grml-small + BRANCH: grml-full-arm64 GITHUB_ENDPOINT: netbootxyz/debian-squash DISCORD_HOOK_URL: ${{ secrets.DISCORD_HOOK_URL }} BUILD_TYPE: initrd_patch @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: grml-small + ref: grml-full-arm64 - name: Get SHA of actual branch instead of master run: | diff --git a/.github/workflows/grml-small-amd64.yml b/.github/workflows/grml-small-amd64.yml new file mode 100644 index 0000000..bc50241 --- /dev/null +++ b/.github/workflows/grml-small-amd64.yml @@ -0,0 +1,85 @@ +name: grml-small-amd64 + +on: + push: + branches: + - grml-small-amd64 + paths-ignore: + - '.github/workflows/**' + schedule: + - cron: '0 4 * * 5' + workflow_dispatch: + +env: + BRANCH: grml-small-amd64 + 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: grml-small-amd64 + + - 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@v2 + 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 diff --git a/.github/workflows/grml-small-arm64.yml b/.github/workflows/grml-small-arm64.yml new file mode 100644 index 0000000..17e4920 --- /dev/null +++ b/.github/workflows/grml-small-arm64.yml @@ -0,0 +1,85 @@ +name: grml-small-arm64 + +on: + push: + branches: + - grml-small-arm64 + paths-ignore: + - '.github/workflows/**' + schedule: + - cron: '0 4 * * 5' + workflow_dispatch: + +env: + BRANCH: grml-small-arm64 + 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: grml-small-arm64 + + - 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@v2 + 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