Actions: Add rocknix-nightly-bot

This commit is contained in:
tiopex
2025-10-29 15:06:11 +01:00
parent f1ef9d7e33
commit 4290273d93

View File

@@ -110,10 +110,17 @@ jobs:
merge-multiple: true
- name: get date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Generate installation token for GitHub App
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.NIGHTLY_APP_ID }}
private-key: ${{ secrets.NIGHTLY_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: create nightlies tag
id: create-nightly-tag
run: |
git remote add distribution-nightly https://${{ secrets.GH_PAT }}@github.com/${{ github.repository_owner }}/distribution-nightly.git
git remote add distribution-nightly https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository_owner }}/distribution-nightly.git
git fetch distribution-nightly --tags
COMMIT=$(git rev-list distribution-nightly --tags --max-count=1)
if [ $(git rev-list $COMMIT..HEAD --count) -eq 0 ]; then
@@ -141,7 +148,7 @@ jobs:
makeLatest: true
prerelease: true
body: ${{ steps.create-nightly-tag.outputs.commit_msg }}
token: ${{ secrets.GH_PAT }}
token: ${{ steps.app-token.outputs.token }}
repo: distribution-nightly
- name: Set up SSH sourceforge
if: env.new_commits == 'true'
@@ -190,6 +197,13 @@ jobs:
id: get-last-tag
run: |
echo "TAG=$(git tag --sort=-creatordate | head -n 1)" >> $GITHUB_OUTPUT
- name: Generate installation token for GitHub App
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.NIGHTLY_APP_ID }}
private-key: ${{ secrets.NIGHTLY_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: release official
uses: ncipollo/release-action@v1
with:
@@ -198,6 +212,7 @@ jobs:
artifacts: ROCKNIX-*
allowUpdates: false
makeLatest: true
token: ${{ steps.app-token.outputs.token }}
draft: true
body: |
&nbsp;&nbsp;<img src="https://raw.githubusercontent.com/ROCKNIX/distribution/dev/distributions/ROCKNIX/logos/rocknix-logo.png" width=192>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[![Latest Version](https://img.shields.io/github/release/ROCKNIX/distribution.svg?color=5998FF&label=latest%20version&style=flat-square)](https://github.com/ROCKNIX/distribution/releases/latest) [![Activity](https://img.shields.io/github/commit-activity/m/ROCKNIX/distribution?color=5998FF&style=flat-square)](https://github.com/ROCKNIX/distribution/commits) [![Pull Requests](https://img.shields.io/github/issues-pr-closed/ROCKNIX/distribution?color=5998FF&style=flat-square)](https://github.com/ROCKNIX/distribution/pulls) [![Discord Server](https://img.shields.io/discord/948029830325235753?color=5998FF&label=chat&style=flat-square)](https://discord.gg/seTxckZjJy)