Skip to content

Commit 879cf04

Browse files
update workflow to require sha input and add test workflow
1 parent eb87622 commit 879cf04

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010
workflow_call:
1111
inputs:
1212
sha:
13-
description: "Quickstart sha/ref to build (use main for latest)"
13+
description: "Quickstart sha to build"
1414
type: "string"
15-
default: "main"
15+
required: true
1616
image_json:
1717
description: "A custom image.json (a single image from the same format as images.json)"
1818
type: "string"
@@ -35,7 +35,7 @@ concurrency:
3535
cancel-in-progress: true
3636

3737
env:
38-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
38+
sha: ${{ inputs.sha || github.event.pull_request.head.sha || github.sha }}
3939
image_repo: ${{ format('{0}/{1}', secrets.DOCKERHUB_TOKEN && 'docker.io' || 'ghcr.io', github.repository) }}
4040
# Cache ID is a value inserted into cache keys. Whenever changing the build
4141
# in a way that needs to use entirely new fresh builds, increment the number
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Workflow Call Test
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
8+
build-custom:
9+
uses: ./.github/workflows/build.yml
10+
with:
11+
sha: ${{ github.event.pull_request.head.sha || github.sha }}
12+
test: true
13+
image_json: |
14+
{
15+
"tag": "custom",
16+
"config": {
17+
"protocol_version_default": 23
18+
},
19+
"deps": [
20+
{ "name": "xdr", "repo": "stellar/rs-stellar-xdr", "ref": "v23.0.0" },
21+
{ "name": "core", "repo": "stellar/stellar-core", "ref": "v23.0.1", "options": { "configure_flags": "--disable-tests" } },
22+
{ "name": "rpc", "repo": "stellar/stellar-rpc", "ref": "v23.0.1" },
23+
{ "name": "horizon", "repo": "stellar/go", "ref": "horizon-v23.0.0" },
24+
{ "name": "friendbot", "repo": "stellar/go", "ref": "horizon-v23.0.0" },
25+
{ "name": "lab", "repo": "stellar/laboratory", "ref": "main" }
26+
],
27+
"additional-tests": []
28+
}

0 commit comments

Comments
 (0)