-
Notifications
You must be signed in to change notification settings - Fork 4
116 lines (107 loc) · 4.5 KB
/
snapshot.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Nightly Build (from Develop branch)
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
push:
paths-ignore:
- .github/workflows/**
- .gitignore
- build.sh
- build-aarch64.sh
- build-jvm.sh
- LICENSE
- mvnw
- mvnw.cmd
- README.md
- release.sh
branches:
- develop
jobs:
define-variables:
runs-on: ubuntu-latest
outputs:
image-version: ${{ steps.step2.outputs.image-version }}
image-name: ${{ steps.step4.outputs.image-name }}
docker-repo: ${{ steps.step4.outputs.docker-repo }}
jvm-x86: ${{ steps.step4.outputs.jvm-x86 }}
jvm-aarch64: ${{ steps.step4.outputs.jvm-aarch64 }}
native-x86: ${{ steps.step4.outputs.native-x86 }}
native-aarch64: ${{ steps.step4.outputs.native-aarch64 }}
steps:
- id: step1
name: Checkout project
uses: actions/checkout@v3
- id: step2
name: Output project version
run: |
echo "::set-output name=image-version::$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- id: step3
name: Load environment variables from .env files
uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: variables.env
- id: step4
name: Output imported environment variables
shell: bash
run: |
echo "::set-output name=image-name::${CONTAINER_IMAGE_NAME}"
echo "::set-output name=docker-repo::${DOCKER_REPO}"
echo "::set-output name=jvm-x86::${JVM_X86}"
echo "::set-output name=jvm-aarch64::${JVM_AARCH64}"
echo "::set-output name=native-x86::${NATIVE_X86}"
echo "::set-output name=native-aarch64::${NATIVE_AARCH64}"
call-nightly-build-native:
needs: define-variables
if: |
needs.define-variables.outputs.native-x86 == 'true'
uses: qiot-project/qiot-ubi-all-reusable-workflows/.github/workflows/app-build-native.yml@main
# To pass named inputs to a called workflow, use the "with" keyword in a job.
# with:
# Use the "secrets" keyword to pass named secrets.
secrets:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
QUAY_USERNAME: ${{ secrets.QUAY_MANUFACTURING_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_MANUFACTURING_PASSWORD }}
# Workflows that call reusable workflows in the same organization or enterprise
# can use the "inherit" keyword to implicitly pass the secrets.
# secrets: inherit
call-nightly-build-native-aarch64:
needs: define-variables
if: |
needs.define-variables.outputs.native-aarch64 == 'true'
uses: qiot-project/qiot-ubi-all-reusable-workflows/.github/workflows/app-build-native-aarch64.yml@main
# To pass named inputs to a called workflow, use the "with" keyword in a job.
with:
CONTAINER_IMAGE_NAME: ${{needs.define-variables.outputs.image-name}}
CONTAINER_IMAGE_VERSION: ${{needs.define-variables.outputs.image-version}}
DOCKER_REPO: ${{needs.define-variables.outputs.docker-repo}}
# Use the "secrets" keyword to pass named secrets.
secrets:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
QUAY_USERNAME: ${{ secrets.QUAY_MANUFACTURING_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_MANUFACTURING_PASSWORD }}
# Workflows that call reusable workflows in the same organization or enterprise
# can use the "inherit" keyword to implicitly pass the secrets.
# secrets: inherit
call-nightly-build-jvm:
needs: define-variables
if: |
needs.define-variables.outputs.jvm-x86 == 'true'
uses: qiot-project/qiot-ubi-all-reusable-workflows/.github/workflows/app-build-jvm.yml@main
# To pass named inputs to a called workflow, use the "with" keyword in a job.
# with:
# Use the "secrets" keyword to pass named secrets.
secrets:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
QUAY_USERNAME: ${{ secrets.QUAY_MANUFACTURING_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_MANUFACTURING_PASSWORD }}
# Workflows that call reusable workflows in the same organization or enterprise
# can use the "inherit" keyword to implicitly pass the secrets.
# secrets: inherit