Skip to content

Commit

Permalink
Add github action workflows for PR and publish (#692)
Browse files Browse the repository at this point in the history
* Add github action workflows for PR and publish

* add submodules checkout

* add tags

* add build args

* rectify build args

* Update publish-snapshot.yml

use list syntax for tags, fix indentation

---------

Co-authored-by: JP <jonathan.i.percival@gmail.com>
  • Loading branch information
mdnazmulkarim and JPercival authored Feb 16, 2023
1 parent 708830c commit e8c3715
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 61 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check PR
on: pull_request

jobs:
maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Run Checks
run: mvn --batch-mode --no-transfer-progress --update-snapshots verify
40 changes: 40 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Snapshot
on:
push:
branches:
- master

jobs:
maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish snapshot
run: mvn --batch-mode -no-transfer-progress --update-snapshots deploy
env:
MAVEN_USERNAME: ${{ vars.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: |
cqframework/cqf-ruler:latest
alphora/cqf-ruler:latest
build-args: COMMIT_HASH=${{ env.GITHUB_SHA }}
21 changes: 0 additions & 21 deletions .travis.settings.xml

This file was deleted.

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

This file was deleted.

0 comments on commit e8c3715

Please sign in to comment.