-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.45 KB
/
Copy pathci.yml
File metadata and controls
52 lines (52 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: CI
on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
ci:
name: ${{ matrix.name }}-${{ matrix.init-script.label }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
init-script:
- label: 'init-script'
path: './.github/workflows/scripts/init.sql'
- label: 'no-init-script'
path: ''
include:
- os: windows-latest
name: Windows
- os: ubuntu-latest
name: Linux
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
- name: Azure login
if: matrix.name == 'Windows'
uses: azure/login@v3.0.0
with:
creds: ${{ secrets.AZURE_ACI_CREDENTIALS }}
- name: Run
uses: ./
with:
connection-string-name: PostgresConnectionString
tag: setup-postgres-action
init-script: ${{ matrix.init-script.path }}
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Validate
shell: pwsh
run: |
echo "PostgresConnectionString = $($Env:PostgresConnectionString)"
if ( $Env:PostgresConnectionString -le 0 ) {
throw "Environment variable 'PostgresConnectionString' not set."
}