-
Notifications
You must be signed in to change notification settings - Fork 19
38 lines (33 loc) · 1.07 KB
/
pr.yaml
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
name: Pull request, build and test the snap
on:
pull_request:
branches: '**'
jobs:
variables:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v3
- id: vars
shell: bash
run: |
tag="$(awk -F: '/version/ { print $2 }' snap/snapcraft.yaml | tr -d '[:space:]')"
echo "tag: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
build:
needs:
- variables
uses: RocketChat/server-snap/.github/workflows/build.yml@develop
with:
tag: ${{ needs.variables.outputs.tag }}
test:
# uses: RocketChat/server-snap/.github/workflows/test.yml@${{ github.head_ref || github.ref_name }}
uses: RocketChat/server-snap/.github/workflows/test.yml@develop
needs: [build, variables]
with:
tag: ${{ needs.variables.outputs.tag }}
snap-artifact-key: ${{ needs.build.outputs.snap-artifact-key }}
snap-basename: ${{ needs.build.outputs.snap-basename }}
secrets:
snapcraft-credential: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}