-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (49 loc) · 1.53 KB
/
check_version.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
54
55
name: Verify PRs to main
on:
workflow_dispatch:
pull_request:
branches:
- main
- develop
- master # for safety reasons
- dev # for safety reasons
jobs:
configure:
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
outputs:
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
steps:
- id: get-user
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT
get_version:
needs: configure
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
container:
image: zondax/ledger-app-builder:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
SDK_VARNAME: NANOSP_SDK
outputs:
version: ${{ steps.store-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- run: make version
- id: store-version
run: echo "version=$(cat ./app/app.version)" >> $GITHUB_OUTPUT
check_app_version:
needs: get_version
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
steps:
- id: checkTag
uses: mukunku/tag-exists-action@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ needs.get_version.outputs.version }}
- run: echo ${{ steps.checkTag.outputs.exists }}
- name: Tag exists
if: ${{ steps.checkTag.outputs.exists == 'true' }}
run: exit 1