Skip to content

Commit

Permalink
Merge pull request #75 from tinder-inakivillar/main
Browse files Browse the repository at this point in the history
Execute Build Samples only on main branch
  • Loading branch information
tinder-inakivillar authored Mar 9, 2022
2 parents 2f58288 + 9aa08ef commit 992c502
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 8
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

Expand All @@ -27,16 +24,6 @@ jobs:
run: ./gradlew ktlintCheck
- name: Build
run: ./gradlew test --stacktrace
- name: Build Samples
run: |
for d in samples/*; do
set -e
[ -d "$d" ] || continue
echo "== $d =="
pushd "$d" >/dev/null
../../gradlew gitQueryInit build
popd >/dev/null
done
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/samples_gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Gradle Samples
on:
push:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Samples
run: |
for d in samples/*; do
set -e
[ -d "$d" ] || continue
echo "== $d =="
pushd "$d" >/dev/null
../../gradlew gitQueryInit build
popd >/dev/null
done

0 comments on commit 992c502

Please sign in to comment.