-
-
Notifications
You must be signed in to change notification settings - Fork 16
149 lines (129 loc) · 5.79 KB
/
daily-build.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: hdfview daily build
# Triggers the workflow on a schedule or on demand
on:
workflow_dispatch:
inputs:
use_ignore:
description: 'Ignore has_changes check'
type: string
required: false
default: check
schedule:
- cron: "7 0 * * *"
permissions:
contents: read
jobs:
get-base-names:
runs-on: ubuntu-latest
outputs:
hdf4-name: ${{ steps.gethdf4base.outputs.HDF4_NAME_BASE }}
hdf5-name: ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}
hdfview-name: ${{ steps.gethdfviewbase.outputs.HDFVIEW_NAME_BASE }}
run-ignore: ${{ steps.getinputs.outputs.INPUTS_IGNORE }}
steps:
- uses: actions/[email protected]
- name: Get hdfview release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
version: 'tags/HDFView-99.99.99'
file: 'last-file.txt'
continue-on-error: true
- name: Read base-name file
id: gethdfviewbase
run: echo "HDFVIEW_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT
- run: echo "hdfview base name is ${{ steps.gethdfviewbase.outputs.HDFVIEW_NAME_BASE }}."
- name: Get hdf4 release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: 'last-file.txt'
- name: Read base-name file
id: gethdf4base
run: echo "HDF4_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT
- name: Get hdf5 release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot'
file: 'last-file.txt'
- name: Read base-name file
id: gethdf5base
run: echo "HDF5_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT
- run: |
echo "hdf4 base name is ${{ steps.gethdf4base.outputs.HDF4_NAME_BASE }}."
echo "hdf5 base name is ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}."
- name: Read inputs
id: getinputs
run: |
echo "INPUTS_IGNORE=${{ inputs.use_ignore }}" >> $GITHUB_OUTPUT
- run: echo "use_ignore is ${{ steps.getinputs.outputs.INPUTS_IGNORE }}."
call-workflow-tarball:
needs: get-base-names
uses: ./.github/workflows/tarball.yml
with:
use_ignore: ${{ needs.get-base-names.outputs.run-ignore }}
use_tag: snapshot
use_environ: snapshots
call-workflow-ant:
needs: [get-base-names, call-workflow-tarball]
uses: ./.github/workflows/ant.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_hdf: ${{ needs.get-base-names.outputs.hdf4-name }}
use_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }}
name_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }}
use_environ: snapshots
secrets:
APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }}
APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }}
AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}
call-workflow-ant-app:
needs: [get-base-names, call-workflow-tarball]
uses: ./.github/workflows/ant-app.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_hdf: ${{ needs.get-base-names.outputs.hdf4-name }}
use_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }}
name_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }}
use_environ: snapshots
secrets:
APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }}
APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }}
AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}
call-workflow-release:
needs: [get-base-names, call-workflow-tarball, call-workflow-ant, call-workflow-ant-app]
permissions:
contents: write # In order to allow tag creation
uses: ./.github/workflows/release-files.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
use_tag: HDFView-99.99.99
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}
call-workflow-remove:
needs: [get-base-names, call-workflow-tarball, call-workflow-ant, call-workflow-ant-app, call-workflow-release]
permissions:
contents: write # In order to allow file deletion
uses: ./.github/workflows/remove-files.yml
with:
file_base: ${{ needs.get-base-names.outputs.hdfview-name }}
use_tag: HDFView-99.99.99
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) && (needs.get-base-names.outputs.hdfview-name != needs.call-workflow-tarball.outputs.file_base) }}