Skip to content

Commit

Permalink
Add basic GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mbouchenoire committed Apr 17, 2021
1 parent 4f2bb4b commit 2cf52c4
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ci-cd

on:
release:
types:
- released

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: build
run: ./gradlew -Pprod clean bootJar
- name: set-release-version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: release
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
./gradlew jib -Djib.to.image=registry.hub.docker.com/mbouchenoire/lowfer:${{ env.RELEASE_VERSION }}
test:
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: test
run: |
./gradlew test integrationTest
npm test
34 changes: 34 additions & 0 deletions .github/workflows/ci-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ci-only

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: build
run: ./gradlew -Pprod clean bootJar
test:
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: test
run: |
./gradlew test integrationTest
npm test

0 comments on commit 2cf52c4

Please sign in to comment.