From 0141a697fc5ebf4060f3580976f7710bbd24376c Mon Sep 17 00:00:00 2001 From: elieser pereira Date: Mon, 9 Nov 2020 17:42:38 -0300 Subject: [PATCH] initial workflow --- .github/workflows/main.yaml | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 000000000..d00280340 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,51 @@ +name: ci + +on: + push: + branches: + - "*" # run for branches + tags: + - "*" # run for tags + pull_request: + branches: + - "*" # run for branches + tags: + - "*" # run for tags + +jobs: + test: + runs-on: ubuntu-latest + env: + GROUP: weaveworksdemos + COMMIT: ${{ github.sha }} + REPO: carts + steps: + - uses: actions/checkout@v2 + + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + # + # + # Build + - name: Build jar files + run: ./scripts/build.sh + + # + # + # Push to dockerhub + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + repository: ${{ env.GROUP }}/${{ env.REPO }} + tag_with_ref: true + tag_with_sha: true + path: docker/carts + dockerfile: docker/carts/Dockerfile +