Skip to content

Commit 4fa2abe

Browse files
authored
Enhance auto_check workflow with stability check
Added steps to check for stable latest release before bumping upstream.
1 parent a3e7584 commit 4fa2abe

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/auto_check.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- run: npx @dappnode/dappnodesdk github-action bump-upstream
15+
16+
- name: Check if latest release is stable
17+
id: check
18+
run: |
19+
RELEASE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
20+
https://api.github.com/repos/nextcloud/server/releases/latest)
21+
PRERELEASE=$(echo "$RELEASE" | jq -r '.prerelease')
22+
echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT
23+
24+
- name: Bump upstream (stable only)
25+
if: steps.check.outputs.prerelease == 'false'
26+
run: npx @dappnode/dappnodesdk github-action bump-upstream
1627
env:
1728
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1829
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}

0 commit comments

Comments
 (0)