Skip to content

Commit

Permalink
pull files from 7.x branch
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb committed Nov 11, 2024
1 parent 2ef4e5e commit 0d3a5e1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test snap

on:
pull_request:
branches: '**'
# - develop

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-and-test:
uses: RocketChat/server-snap/.github/workflows/test.yml@develop
needs: [variables]
with:
tag: ${{ needs.variables.outputs.tag }}
test-only: 'true'

8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
tag:
required: true
type: string
test-only:
required: false
type: string
default: 'false'
outputs:
snap-basename:
value: ${{ jobs.build.outputs.snap-basename }}
Expand Down Expand Up @@ -71,7 +75,9 @@ jobs:
(( ${v1[2]} > ${v2[2]} )) && return 0
return 1
}
if is_gt $version $current_version; then
if [[ ${{ inputs.test-only }} == "true" ]]; then
run=true
elif is_gt $version $current_version; then
run=true
if [[ $candidate == 'false' ]]; then commit=true; fi
fi
Expand Down

0 comments on commit 0d3a5e1

Please sign in to comment.