Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
niravassar committed Oct 18, 2021
1 parent 2c125b4 commit bafdfdc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 17 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Java CI with Gradle
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
env:
JDK_VERSION: ${{ matrix.java }}
steps:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run script
run: ./githubactions-build.sh
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_NAME: ${{ secrets.GIT_NAME }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions travis-build.sh → githubactions-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ set -e

export EXIT_STATUS=0

curl -O https://raw.githubusercontent.com/grails/grails-guides/master/travis/build-guide
curl -O https://raw.githubusercontent.com/grails/grails-guides/master/githubactions/build-guide
chmod 777 build-guide

./build-guide || EXIT_STATUS=$?

if [[ $EXIT_STATUS -ne 0 ]]; then
echo "Build failed"
echo "build-guide failed"
exit $EXIT_STATUS
fi
fi

curl -O https://raw.githubusercontent.com/grails/grails-guides/master/travis/republish-guides-website.sh
curl -O https://raw.githubusercontent.com/grails/grails-guides/master/githubactions/republish-guides-website.sh
chmod 777 republish-guides-website.sh

./republish-guides-website.sh || EXIT_STATUS=$?
Expand Down

0 comments on commit bafdfdc

Please sign in to comment.