Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit 0141a69

Browse files
committed
initial workflow
1 parent 69b5cc6 commit 0141a69

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/main.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- "*" # run for branches
7+
tags:
8+
- "*" # run for tags
9+
pull_request:
10+
branches:
11+
- "*" # run for branches
12+
tags:
13+
- "*" # run for tags
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
env:
19+
GROUP: weaveworksdemos
20+
COMMIT: ${{ github.sha }}
21+
REPO: carts
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
26+
- name: Set up JDK 1.8
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 1.8
30+
31+
#
32+
#
33+
# Build
34+
- name: Build jar files
35+
run: ./scripts/build.sh
36+
37+
#
38+
#
39+
# Push to dockerhub
40+
- name: Push to Docker Hub
41+
uses: docker/build-push-action@v1
42+
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
43+
with:
44+
username: ${{ secrets.DOCKER_USER }}
45+
password: ${{ secrets.DOCKER_PASS }}
46+
repository: ${{ env.GROUP }}/${{ env.REPO }}
47+
tag_with_ref: true
48+
tag_with_sha: true
49+
path: docker/carts
50+
dockerfile: docker/carts/Dockerfile
51+

0 commit comments

Comments
 (0)