ci: simplify matrix setup (#69)

This commit is contained in:
Zack Pollard
2024-11-26 15:00:31 +00:00
committed by GitHub
parent ab27eaab84
commit 7b27e66e19
2 changed files with 8 additions and 20 deletions
+7 -15
View File
@@ -22,11 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- app: my.immich.app
name: my
- app: buy.immich.app
name: buy
app_name: ['my', 'buy']
steps:
- name: Checkout code
@@ -56,7 +52,7 @@ jobs:
- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: build-output-${{ matrix.name }}
name: build-output-${{ matrix.app_name }}
path: build
retention-days: 1
@@ -67,13 +63,9 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- app: my.immich.app
name: my
- app: buy.immich.app
name: buy
app_name: ['my', 'buy']
env:
TF_VAR_app_name: ${{ matrix.name }}
TF_VAR_app_name: ${{ matrix.app_name }}
TF_VAR_dist_dir: ${{ github.workspace }}/dist
TF_VAR_stage: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || '' }}
OP_SERVICE_ACCOUNT_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.OP_TF_PROD_ENV || secrets.OP_TF_DEV_ENV }}
@@ -84,7 +76,7 @@ jobs:
- name: 'Get build artifact'
uses: actions/download-artifact@v4
with:
name: 'build-output-${{ matrix.name }}'
name: 'build-output-${{ matrix.app_name }}'
path: '${{ github.workspace }}/build'
- name: Install 1Password CLI
@@ -127,6 +119,6 @@ jobs:
with:
number: ${{ github.event.number }}
body: |
📖 Preview of ${{ matrix.app }} deployed to [${{ fromJson(steps.deploy-output.outputs.output).immich_subdomain.value }}](https://${{ fromJson(steps.deploy-output.outputs.output).immich_subdomain.value }})
📖 Preview of ${{ matrix.app_name }}.immich.app deployed to [${{ fromJson(steps.deploy-output.outputs.output).immich_subdomain.value }}](https://${{ fromJson(steps.deploy-output.outputs.output).immich_subdomain.value }})
emojis: 'rocket'
body-include: '<!-- ${{ matrix.app }} PR URL -->'
body-include: '<!-- ${{ matrix.app_name }} PR URL -->'
+1 -5
View File
@@ -10,11 +10,7 @@ jobs:
fail-fast: false
matrix:
environment: ['dev', 'prod']
include:
- app: my.immich.app
name: my-immich
- app: buy.immich.app
name: buy-immich
name: ['my', 'buy']
steps:
- name: Checkout code
uses: actions/checkout@v4