-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (44 loc) · 1.01 KB
/
on-push.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
41
42
43
44
45
46
47
48
name: Build and push docker images
on:
push:
branches:
- master
- main
paths:
- '.github/workflows/*'
- '.github/*'
- 'src/Dockerfile*'
- 'src/rootfs/*'
- 'src/hook/*'
- 'src/VERSIONS'
- 'src/*.sh'
- 'src/VERSIONS'
- 'tests/**'
pull_request:
branches:
- master
- main
paths:
- '.github/workflows/*'
- '.github/*'
- 'src/Dockerfile'
- 'src/rootfs/*'
- 'src/hook/*'
- 'src/*.sh'
- 'src/VERSIONS'
- 'tests/**'
jobs:
build:
name: Build and push image to dockerhub
runs-on: ubuntu-22.04
steps:
- name: Repo checkout
uses: actions/checkout@v2
- name: Login to DockerHub Registry
run: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build and push images
run: |
cd ${GITHUB_WORKSPACE}/src/hook
./build.sh
./push.sh