-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.12 KB
/
pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: On-Pull-Request
run-name: 🤖 ${{ github.actor }} is validating PR
on:
push:
branches:
- feature/*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}
cancel-in-progress: true
jobs:
artifact-version:
runs-on: ubuntu-latest
outputs:
package: ${{ steps.package.artifact-version }}
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 📦 Retrieve Artifact-version from package
id: package
run: |
BASE_REF=$(echo "${{ github.base_ref }}" | cut -d'/' -f2-)
if [ -z "$BASE_REF" ]; then
BASE_REF="$((minutes=$(date +%s)/60))"
fi
ARTIFACT_VERSION=$(jq -r '.version' package.json)-$BASE_REF
echo "📝 Retrieved version: $ARTIFACT_VERSION" >> $GITHUB_STEP_SUMMARY
echo "artifact-version=${ARTIFACT_VERSION}-" >> $GITHUB_OUTPUT
artifact-build:
uses: ./.github/workflows/rwf_build.yml
with:
environment: test
artifact-name: gh-actions-playground
artifact-version: ${{ needs.artifact-version.outputs.package }}
secrets: inherit