Skip to content

Commit 9fdd651

Browse files
authored
Merge pull request #162 from sil-org/github-flow
adapt the workflow to use GitHub Flow
2 parents 915e22b + d4568ce commit 9fdd651

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/test-deploy-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ jobs:
5252
deploy:
5353
name: Deploy to AWS Lambda
5454
needs: [ 'tests', 'lint' ]
55-
if: github.ref_name == 'main' || github.ref_name == 'develop'
56-
environment: ${{ github.ref_name }}
55+
if: github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/')
56+
environment:
57+
name: ${{ startsWith(github.ref, 'refs/tags/') && 'prod' || 'dev' }}
5758
runs-on: ubuntu-latest
5859
concurrency:
5960
group: deploy-${{ github.ref }}-${{ matrix.region }}
@@ -84,7 +85,6 @@ jobs:
8485
run: CGO_ENABLED=0 go build -tags lambda.norpc -ldflags="-s -w" -o bootstrap ./lambda
8586

8687
- name: CDK Deploy
87-
if: github.ref_name == 'develop' || github.ref_name == 'main'
8888
env:
8989
AWS_REGION: ${{ matrix.region }}
9090
ENVIRONMENT: ${{ vars.STAGE }}
@@ -100,7 +100,7 @@ jobs:
100100
build-and-publish:
101101
name: Build and Publish
102102
needs: [ 'tests', 'lint' ]
103-
if: github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/')
103+
if: github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/')
104104
runs-on: ubuntu-latest
105105
steps:
106106
- name: Checkout code

0 commit comments

Comments
 (0)