|
12 | 12 | TF_WORKSPACE: ${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }} |
13 | 13 |
|
14 | 14 | jobs: |
15 | | - create-db: |
16 | | - runs-on: ubuntu-24.04 |
17 | | - defaults: |
18 | | - run: |
19 | | - working-directory: ./infrastructure/applications |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4 |
22 | | - if: github.ref != 'refs/heads/main' |
23 | | - with: |
24 | | - ref: ${{ github.ref }} |
25 | | - fetch-depth: 0 |
26 | | - - name: Configure AWS credentials |
27 | | - if: github.ref != 'refs/heads/main' |
28 | | - uses: aws-actions/configure-aws-credentials@v4 |
29 | | - with: |
30 | | - aws-access-key-id: ${{ secrets.aws_access_key_id }} |
31 | | - aws-secret-access-key: ${{ secrets.aws_secret_access_key }} |
32 | | - aws-region: eu-central-1 |
33 | | - - uses: hashicorp/setup-terraform@v3 |
34 | | - if: github.ref != 'refs/heads/main' |
35 | | - with: |
36 | | - terraform_version: 1.2.4 |
37 | | - - name: Terraform Init |
38 | | - if: github.ref != 'refs/heads/main' |
39 | | - run: terraform init |
40 | | - env: |
41 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
42 | | - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
43 | | - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
44 | | - - name: Terraform apply |
45 | | - if: github.ref != 'refs/heads/main' |
46 | | - run: terraform apply -target module.database -no-color -auto-approve &> /dev/null |
47 | | - env: |
48 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
49 | | - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
50 | | - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
51 | | - AWS_DEFAULT_REGION: eu-central-1 |
| 15 | + # create-db: |
| 16 | + # runs-on: ubuntu-24.04 |
| 17 | + # defaults: |
| 18 | + # run: |
| 19 | + # working-directory: ./infrastructure/applications |
| 20 | + # steps: |
| 21 | + # - uses: actions/checkout@v4 |
| 22 | + # if: github.ref != 'refs/heads/main' |
| 23 | + # with: |
| 24 | + # ref: ${{ github.ref }} |
| 25 | + # fetch-depth: 0 |
| 26 | + # - name: Configure AWS credentials |
| 27 | + # if: github.ref != 'refs/heads/main' |
| 28 | + # uses: aws-actions/configure-aws-credentials@v4 |
| 29 | + # with: |
| 30 | + # aws-access-key-id: ${{ secrets.aws_access_key_id }} |
| 31 | + # aws-secret-access-key: ${{ secrets.aws_secret_access_key }} |
| 32 | + # aws-region: eu-central-1 |
| 33 | + # - uses: hashicorp/setup-terraform@v3 |
| 34 | + # if: github.ref != 'refs/heads/main' |
| 35 | + # with: |
| 36 | + # terraform_version: 1.2.4 |
| 37 | + # - name: Terraform Init |
| 38 | + # if: github.ref != 'refs/heads/main' |
| 39 | + # run: terraform init |
| 40 | + # env: |
| 41 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 42 | + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 43 | + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 44 | + # - name: Terraform apply |
| 45 | + # if: github.ref != 'refs/heads/main' |
| 46 | + # run: terraform apply -target module.database -no-color -auto-approve &> /dev/null |
| 47 | + # env: |
| 48 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 49 | + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 50 | + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 51 | + # AWS_DEFAULT_REGION: eu-central-1 |
52 | 52 |
|
53 | 53 | build-pretix: |
54 | 54 | runs-on: [self-hosted] |
@@ -192,7 +192,7 @@ jobs: |
192 | 192 |
|
193 | 193 | deploy-be: |
194 | 194 | runs-on: ubuntu-24.04 |
195 | | - needs: [build-be, build-pretix, create-db] |
| 195 | + needs: [build-be, build-pretix] |
196 | 196 | environment: |
197 | 197 | name: ${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }} |
198 | 198 | defaults: |
@@ -235,7 +235,7 @@ jobs: |
235 | 235 | import time |
236 | 236 |
|
237 | 237 | while True: |
238 | | - response = requests.get(f"https://{os.getenv('URL')/health/") |
| 238 | + response = requests.get(f"https://{os.getenv('URL')}/health/") |
239 | 239 | try: |
240 | 240 | commit = response.json()['version'] |
241 | 241 | if commit == os.getenv('GITHASH'): |
|
0 commit comments