File tree 5 files changed +27
-3
lines changed
5 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 16
16
provider : " aws "
17
17
path : " global/ci/earthly "
18
18
}
19
+ org : " Catalyst "
19
20
satellite : " ci "
20
21
}
21
22
}
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ package schema
69
69
// +optional
70
70
credentials ?: #Secret @go (Credentials )
71
71
72
+ // Org specifies the Earthly Cloud organization to use.
73
+ // +optional
74
+ org ?: null | string @go (Org ,*string )
75
+
72
76
// Satellite contains the satellite to use for caching.
73
77
// +optional
74
78
satellite ?: null | string @go (Satellite ,*string )
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ type ProviderEarthly struct {
75
75
// +optional
76
76
Credentials Secret `json:"credentials"`
77
77
78
+ // Org specifies the Earthly Cloud organization to use.
79
+ // +optional
80
+ Org * string `json:"org"`
81
+
78
82
// Satellite contains the satellite to use for caching.
79
83
// +optional
80
84
Satellite * string `json:"satellite"`
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ package schema
69
69
// +optional
70
70
credentials ?: #Secret @go (Credentials )
71
71
72
+ // Org specifies the Earthly Cloud organization to use.
73
+ // +optional
74
+ org ?: null | string @go (Org ,*string )
75
+
72
76
// Satellite contains the satellite to use for caching.
73
77
// +optional
74
78
satellite ?: null | string @go (Satellite ,*string )
Original file line number Diff line number Diff line change 23
23
uses : actions/cache@v4
24
24
with :
25
25
path : /usr/local/bin/forge
26
- key : ${{ runner.os }}-forge-${{ hashFiles('forge/cli/**') }}
26
+ key : ${{ runner.os }}-forge-${{ hashFiles('forge/cli/**', 'blueprint/**' ) }}
27
27
restore-keys : |
28
28
${{ runner.os }}-forge-
29
29
- name : Build Forge CLI
97
97
run : |
98
98
BP=$(forge blueprint dump .)
99
99
100
- EARTHLY=$(echo "$BP" | jq -r .ci.providers.earthly.credentials )
100
+ EARTHLY=$(echo "$BP" | jq -r .ci.providers.earthly)
101
101
if [[ "$EARTHLY" != "null" ]]; then
102
+ ORG=$(echo "$BP" | jq -r .ci.providers.earthly.org)
103
+ fi
104
+
105
+ EARTHLY_CREDS=$(echo "$BP" | jq -r .ci.providers.earthly.credentials)
106
+ if [[ "$EARTHLY_CREDS" != "null" ]]; then
102
107
SECRET=$(forge secret get -b . ci.providers.earthly.credentials)
103
108
TOKEN=$(echo "$SECRET" | jq -r .token)
104
109
@@ -108,14 +113,20 @@ runs:
108
113
fi
109
114
fi
110
115
116
+ echo "org=$ORG" >> $GITHUB_OUTPUT
117
+
111
118
echo "::add-mask::$TOKEN"
112
119
echo "token=$TOKEN" >> $GITHUB_OUTPUT
113
120
- name : Login to Earthly Cloud
114
121
if : steps.earthly.outputs.token != ''
115
122
shell : bash
116
123
run : |
117
124
earthly account login --token "${{ steps.earthly.outputs.token }}"
118
-
125
+ - name : Set Earthly organization
126
+ if : steps.earthly.outputs.org != ''
127
+ shell : bash
128
+ run : |
129
+ earthly org select "${{ steps.earthly.outputs.org }}""
119
130
- name : Testing
120
131
shell : bash
121
132
run : |
You can’t perform that action at this time.
0 commit comments