on master help sign in
check versions
09bf8b8iko
.github/workflows/github-actions-image.yaml+19
@@ -9,7 +9,24 @@ on:
9 types: [prereleased]
9 types: [prereleased]
10
10
11jobs:
11jobs:
12+ check_versions:
13+ if: github.event_name == 'release'
14+ runs-on: ubuntu-latest
15+ steps:
16+ - name: Check library version
17+ run: |
18+ if [ "$(awk -F ':' '/^version/ {gsub(/ /, "", $2); print $2}' compaREST.cabal)" != "0.0.0.1" ]; then
19+ echo "::error file=compaREST.cabal::Library version does not match release version."
20+ fi
21+
22+ - name: Check docker tag
23+ run: |
24+ if [ "$(yq eval '.runs.image' action.yaml | awk -F ':' '{print $NF}')" != "latet" ]; then
25+ echo "::error file=action.yaml::Action docker tag does not match release tag."
26+ fi
27+
12 Linux:
28 Linux:
29+ needs: check_versions
13 runs-on: ubuntu-latest
30 runs-on: ubuntu-latest
14 steps:
31 steps:
15 - uses: actions/checkout@v2
32 - uses: actions/checkout@v2
@@ -113,6 +130,7 @@ jobs:
113 tag: ${{ github.ref }}
130 tag: ${{ github.ref }}
114
131
115 macOS:
132 macOS:
133+ needs: check_versions
116 runs-on: macos-latest
134 runs-on: macos-latest
117 steps:
135 steps:
118 - uses: actions/checkout@v2
136 - uses: actions/checkout@v2
@@ -149,6 +167,7 @@ jobs:
149 tag: ${{ github.ref }}
167 tag: ${{ github.ref }}
150
168
151 Linux-Windows:
169 Linux-Windows:
170+ needs: check_versions
152 runs-on: ubuntu-latest
171 runs-on: ubuntu-latest
153 steps:
172 steps:
154 - uses: actions/checkout@v2
173 - uses: actions/checkout@v2