-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (76 loc) · 2.57 KB
/
publish.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
name: Publish UMM-S Record
on:
workflow_dispatch:
inputs:
venue:
type: choice
description: Venue to deploy to
options:
- UAT
- OPS
version:
type: string
description: SWODLR UMM-S record version
record_base_url:
type: string
description: Base URL for SWODLR
default: "https://swodlr.podaac.earthdatacloud.nasa.gov"
jobs:
publish:
name: Publish UMM-S Record
runs-on: ubuntu-latest
env:
VENUE: ${{ github.event.inputs.venue }}
VERSION: ${{ github.event.inputs.version }}
RECORD_BASE_URL: ${{ github.event.inputs.record_base_url }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
- name: set environment vars
id: lowercase
run: |
echo TARGET_ENV_LOWERCASE=${{ env.VENUE }} | tr '[:upper:]' '[:lower:]' >> "$GITHUB_OUTPUT"
- name: Publish UMM-S with new version
id: publish-umm-s
uses: podaac/[email protected]
env:
LAUNCHPAD_TOKEN_SIT: ${{secrets.LAUNCHPAD_TOKEN_SIT}}
LAUNCHPAD_TOKEN_UAT: ${{secrets.LAUNCHPAD_TOKEN_UAT}}
LAUNCHPAD_TOKEN_OPS: ${{secrets.LAUNCHPAD_TOKEN_OPS}}
with:
umm-json: 'cmr/swodlr_umm_s.json'
provider: 'POCLOUD'
env: ${{ steps.lowercase.outputs.TARGET_ENV_LOWERCASE }}
version: ${{ env.VERSION }}
timeout: 60
disable_removal: 'true'
umm_type: 'umm-s'
use_associations: 'true'
umm_version: 1.5.2
url_value: ${{ env.RECORD_BASE_URL }}
continue-on-error: true
- name: Wait to retry publishing UMM-S
if: steps.publish-umm-s.outcome == 'failure'
run: |
sleep 120
- name: Publish UMM-S with new version retry
id: publish-umm-s-retry
uses: podaac/[email protected]
if: |
steps.publish-umm-s.outcome == 'failure'
with:
umm-json: 'cmr/swodlr_umm_s.json'
provider: 'POCLOUD'
env: ${{ steps.lowercase.outputs.TARGET_ENV_LOWERCASE }}
version: ${{ env.VERSION }}
timeout: 60
disable_removal: 'true'
umm_type: 'umm-s'
use_associations: 'false'
umm_version: 1.5.2
url_value: ${{ env.RECORD_BASE_URL }}
env:
LAUNCHPAD_TOKEN_SIT: ${{secrets.LAUNCHPAD_TOKEN_SIT}}
LAUNCHPAD_TOKEN_UAT: ${{secrets.LAUNCHPAD_TOKEN_UAT}}
LAUNCHPAD_TOKEN_OPS: ${{secrets.LAUNCHPAD_TOKEN_OPS}}