Skip to content

Commit 0fc3ef9

Browse files
committed
Create ci.yml
Signed-off-by: kanishkarj <[email protected]>
1 parent 1f5d887 commit 0fc3ef9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Learn Layer5
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
docker:
11+
name: Docker build and push
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
16+
uses: actions/checkout@master
17+
with:
18+
fetch-depth: 1
19+
- name: Docker login
20+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
21+
uses: azure/docker-login@v1
22+
with:
23+
username: ${{ secrets.DOCKER_USERNAME }}
24+
password: ${{ secrets.DOCKER_PASSWORD }}
25+
- name: Docker build & push
26+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
27+
run: |
28+
make build-img-service
29+
make image-push

0 commit comments

Comments
 (0)