forked from saltstack/salt-winrepo-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.33 KB
/
refresh_db.yml
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
53
name: Test `pkg.refresh_db`
on:
- pull_request
- push
- workflow_call
- workflow_dispatch
jobs:
gsv:
name: Get Salt versions
runs-on: ubuntu-latest
outputs:
salt-versions: ${{ steps.get-salt-versions.outputs.salt-versions }}
steps:
- id: get-salt-versions
uses: dafyddj/get-salt-versions@v2
test:
name: Test `pkg.refresh_db`
needs: gsv
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
salt-version: ${{ fromJSON(needs.gsv.outputs.salt-versions) }}
steps:
- uses: actions/checkout@v3
with:
path: win/repo-ng
- name: Setup Salt
uses: dafyddj/setup-salt-win@v2
with:
salt-version: ${{ matrix.salt-version }}
custom-config: |
osenv:
driver: env
file_roots:
base:
- sdb://osenv/GITHUB_WORKSPACE
- name: Run `salt-call pkg.refresh_db`
run: |
$pkgs = (salt-call --out=json pkg.refresh_db | ConvertFrom-Json).local
if ($LASTEXITCODE) {
Write-Host ("::error title=salt-call::salt-call returned exit code: $LASTEXITCODE")
exit 1
}
$pkgs
release:
name: Release
needs: test
runs-on: ubuntu-latest
steps:
- run: echo "Tests succeeded!"