Skip to content

Commit d67f679

Browse files
committed
ci: use reusable nightly workflow
1 parent 77d6333 commit d67f679

File tree

1 file changed

+7
-61
lines changed

1 file changed

+7
-61
lines changed

.github/workflows/nightly.yaml

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,70 +9,16 @@ on:
99
schedule:
1010
- cron: "0 3 * * *" # run at 03:00 UTC
1111

12-
env:
13-
INPUT_VERSION: ${{ github.event.inputs.version || inputs.version }}
14-
1512
jobs:
16-
Secrets-Presence:
17-
name: "Check for required credentials"
18-
runs-on: ubuntu-latest
19-
outputs:
20-
HAS_OSSRH: ${{ steps.secrets-presence.outputs.HAS_OSSRH }}
21-
HAS_WEBHOOK: ${{ steps.secrets-presence.outputs.HAS_WEBHOOK }}
22-
steps:
23-
- name: Check whether secrets exist
24-
id: secrets-presence
25-
run: |
26-
[ ! -z "${{ secrets.ORG_GPG_PASSPHRASE }}" ] &&
27-
[ ! -z "${{ secrets.ORG_GPG_PRIVATE_KEY }}" ] &&
28-
[ ! -z "${{ secrets.ORG_OSSRH_USERNAME }}" ] && echo "HAS_OSSRH=true" >> $GITHUB_OUTPUT
29-
[ ! -z "${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }}" ] && echo "HAS_WEBHOOK=true" >> $GITHUB_OUTPUT
30-
exit 0
31-
32-
Determine-Version:
33-
runs-on: ubuntu-latest
34-
outputs:
35-
VERSION: ${{ steps.get-version.outputs.VERSION }}
36-
steps:
37-
- uses: actions/checkout@v4
38-
- name: "Get version"
39-
id: get-version
40-
run: |
41-
if [ -z ${{ env.INPUT_VERSION }} ]; then
42-
echo "VERSION=$(IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<$(grep "version" gradle.properties | awk -F= '{print $2}') && echo $RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$RELEASE_VERSION_PATCH-$(date +"%Y%m%d")-SNAPSHOT)" >> "$GITHUB_OUTPUT"
43-
else
44-
echo "VERSION=${{ env.INPUT_VERSION }}" >> "$GITHUB_OUTPUT"
45-
fi
4613

4714
Run-Tests:
4815
uses: ./.github/workflows/verify.yaml
4916
secrets: inherit
5017

51-
Publish-Artefacts:
52-
runs-on: ubuntu-latest
53-
needs: [ Secrets-Presence, Run-Tests, Determine-Version ]
54-
if: |
55-
needs.Secrets-Presence.outputs.HAS_OSSRH
56-
steps:
57-
- uses: eclipse-edc/.github/.github/actions/publish-maven-artifacts@main
58-
with:
59-
version: ${{ needs.Determine-Version.outputs.VERSION }}
60-
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
61-
gpg-passphrase: ${{ secrets.ORG_GPG_PASSPHRASE }}
62-
osshr-username: ${{ secrets.ORG_OSSRH_USERNAME }}
63-
osshr-password: ${{ secrets.ORG_OSSRH_PASSWORD }}
64-
65-
Post-To-Discord:
66-
needs: [ Publish-Artefacts, Determine-Version, Secrets-Presence ]
67-
if: "needs.Secrets-Presence.outputs.HAS_WEBHOOK && always()"
68-
runs-on: ubuntu-latest
69-
steps:
70-
- uses: sarisia/actions-status-discord@v1
71-
name: "Invoke discord webhook"
72-
with:
73-
webhook: ${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }}
74-
# if the publishing is skipped, that means the preceding test run failed
75-
status: ${{ needs.Publish-Artefacts.result == 'skipped' && 'Failure' || needs.Publish-Artefacts.result }}
76-
title: "Release Build Technology AZURE"
77-
description: "Build and publish ${{ needs.Determine-Version.outputs.VERSION }}"
78-
username: GitHub Actions
18+
Publish:
19+
if: always()
20+
needs: [ Run-Tests ]
21+
uses: eclipse-edc/.github/.github/workflows/technology-nightly.yml@main
22+
secrets: inherit
23+
with:
24+
version: ${{ inputs.version }}

0 commit comments

Comments
 (0)