|
30 | 30 | needs: [tests-ui, tests-pytest]
|
31 | 31 | permissions:
|
32 | 32 | packages: write
|
| 33 | + id-token: write |
| 34 | + contents: read |
33 | 35 |
|
34 | 36 | steps:
|
35 | 37 | - name: Checkout
|
@@ -57,34 +59,25 @@ jobs:
|
57 | 59 | - name: Write tag to file
|
58 | 60 | run: echo "${{ github.ref_name }}" >> pems/static/version.txt
|
59 | 61 |
|
60 |
| - - name: Docker Login to GitHub Container Registry |
61 |
| - uses: docker/login-action@v3 |
| 62 | + - name: Configure AWS Credentials |
| 63 | + uses: aws-actions/configure-aws-credentials@v4 |
62 | 64 | with:
|
63 |
| - registry: ghcr.io |
64 |
| - username: ${{ github.actor }} |
65 |
| - password: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + role-to-assume: secrets.ROLE_TO_ASSUME |
| 66 | + aws-region: ${{ vars.AWS_REGION }} |
66 | 67 |
|
67 |
| - - name: Set up QEMU |
68 |
| - uses: docker/setup-qemu-action@v3 |
| 68 | + - name: Install AWS Copilot CLI |
| 69 | + run: | |
| 70 | + curl -Lo copilot https://github.com/aws/copilot-cli/releases/latest/download/copilot-linux |
| 71 | + chmod +x copilot |
| 72 | + sudo mv copilot /usr/local/bin/copilot |
69 | 73 |
|
70 |
| - - name: Set up Docker Buildx |
71 |
| - id: buildx |
72 |
| - uses: docker/setup-buildx-action@v3 |
| 74 | + - name: Deploy web Service |
| 75 | + run: | |
| 76 | + copilot deploy --name web --env dev |
73 | 77 |
|
74 |
| - - name: Build, tag, and push image to GitHub Container Registry |
75 |
| - uses: docker/build-push-action@v6 |
76 |
| - with: |
77 |
| - platforms: linux/amd64,linux/arm64 |
78 |
| - builder: ${{ steps.buildx.outputs.name }} |
79 |
| - build-args: GIT-SHA=${{ github.sha }} |
80 |
| - cache-from: type=gha,scope=compilerla |
81 |
| - cache-to: type=gha,scope=compilerla,mode=max |
82 |
| - context: . |
83 |
| - file: appcontainer/Dockerfile |
84 |
| - push: true |
85 |
| - tags: | |
86 |
| - ghcr.io/${{ github.repository }}:${{ github.ref_name }} |
87 |
| - ghcr.io/${{ github.repository }}:${{ github.sha }} |
| 78 | + - name: Deploy streamlit Service |
| 79 | + run: | |
| 80 | + copilot deploy --name streamlit --env dev |
88 | 81 |
|
89 | 82 | release:
|
90 | 83 | needs: deploy
|
|
0 commit comments