-
Notifications
You must be signed in to change notification settings - Fork 384
40 lines (40 loc) · 969 Bytes
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Main workflow
on: push
env: # Set the secret as an input
docker_username: ${{ github.actor }}
docker_password: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMIT: "${{ github.sha }} ::8"
jobs:
Build:
runs-on: ubuntu-latest
container: gradle:6-jdk11
steps:
- name: Clone down repository
uses: actions/checkout@v4
- name: Build application
run: ci/build-app.sh
- name: Test
run: ci/unit-test-app.sh
- name: ls
run: ls -la ci
- uses: actions/upload-artifact@v4
with:
name: code
path: .
Docker-image:
runs-on: ubuntu-latest
needs: [Build]
permissions:
packages: write
steps:
- name: Download code
uses: actions/download-artifact@v4
with:
name: code
path: .
- name: ls
run: ls -la ci
- name: build docker
run: bash ci/build-docker.sh
- name: push docker
run: ci/push-docker.sh