Skip to content

Commit b7fb3fe

Browse files
committed
Attempt at fixing build?
1 parent 10a726a commit b7fb3fe

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Build, test and deploy
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
10-
build:
10+
test:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
id-token: write # Needed for OIDC login
@@ -27,19 +27,28 @@ jobs:
2727
- name: Run tests
2828
run: uv run pytest
2929

30+
docker:
31+
runs-on: ubuntu-latest
32+
if: github.ref == 'refs/heads/main'
33+
needs: [test]
34+
permissions:
35+
id-token: write # Needed for OIDC login
36+
steps:
37+
- uses: actions/checkout@v4
38+
3039
- name: Configure AWS credentials
3140
uses: aws-actions/configure-aws-credentials@v4
3241
with:
3342
role-to-assume: arn:aws:iam::052730242331:role/github-actions/explain-ci
3443
aws-region: us-east-1
3544

3645
- name: Login to Amazon ECR
46+
if: github.ref == 'refs/heads/main'
3747
id: login-ecr
3848
uses: aws-actions/amazon-ecr-login@v2
3949

4050
- name: Build docker image
4151
run: docker build -t explain .
42-
4352
- name: Push docker image to Amazon ECR Public
4453
if: github.ref == 'refs/heads/main'
4554
env:

0 commit comments

Comments
 (0)