Skip to content

Commit f978f03

Browse files
committed
workon versioning
1 parent e2f86e0 commit f978f03

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/cd-nofos.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,24 @@ on:
2323
- staging
2424
- prod
2525
version:
26+
description: "git reference to deploy (e.g., a branch, tag, or commit SHA)"
27+
required: true
2628
default: "main"
27-
description: Tag or branch or SHA to deploy
29+
type: string
2830

2931
jobs:
3032
checks:
3133
uses: ./.github/workflows/ci-nofos.yml
3234
with:
33-
version: ${{ inputs.version || github.ref }}
35+
version: ${{ inputs.version || 'main' }}
3436

3537
deploy:
3638
name: Deploy
3739
needs: [checks]
3840
uses: ./.github/workflows/deploy-nofos.yml
3941
with:
4042
environment: ${{ inputs.environment }}
41-
version: ${{ inputs.version || github.ref}}
43+
version: ${{ inputs.version || 'main' }}
4244

4345
send-slack-notification:
4446
if: failure()

.github/workflows/ci-nofos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626
with:
2727
repository: HHS/simpler-grants-pdf-builder
28-
ref: ${{ inputs.version || github.ref }}
28+
ref: ${{ inputs.version || 'main' }}
2929

3030
- name: Build docker image
3131
run: make build
@@ -34,10 +34,10 @@ jobs:
3434
run: make test USE_DOCKER=1
3535

3636
- name: Save built image to cache
37-
run: docker save nofos:${{ inputs.version || github.ref }} > /tmp/docker-image.tar
37+
run: docker save nofos:${{ inputs.version || 'main' }} > /tmp/docker-image.tar
3838

3939
- name: Cache Docker image
4040
uses: actions/cache/save@v4
4141
with:
4242
path: /tmp/docker-image.tar
43-
key: nofos-${{ inputs.version || github.ref }}
43+
key: nofos-${{ inputs.version || 'main' }}

0 commit comments

Comments
 (0)