Skip to content

Commit be39f90

Browse files
workflows: consolidate build, test, and push actions
Consolidate all of our workflows into one yaml file. This means that the "nightly" actions that build and test those images will be run on PRs. Add the daily scheduled action that will test *and* push for all image types not just the nightly rpms image. Signed-off-by: John Mulligan <[email protected]>
1 parent 5df1e19 commit be39f90

File tree

2 files changed

+36
-49
lines changed

2 files changed

+36
-49
lines changed

.github/workflows/container-image.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
name: Container Image CI
1+
name: Samba Container Image CI
22

33
on:
44
push:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8+
schedule:
9+
- cron: '0 2 * * *'
810

911
jobs:
1012

@@ -64,6 +66,25 @@ jobs:
6466
- name: Test the server image
6567
run: make test-server
6668

69+
# Reminder: the nightly-server images consume nightly samba rpm builds
70+
# it is not *just* an image that gets built nightly
71+
build-nightly-server:
72+
runs-on: ubuntu-latest
73+
env:
74+
BUILDAH_FORMAT: oci
75+
steps:
76+
- uses: actions/checkout@v2
77+
- name: Build the nightly server image
78+
run: make build-nightly-server
79+
80+
test-nightly-server:
81+
#needs: build-nightly-server
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v2
85+
- name: Test the nightly server image
86+
run: make test-nightly-server
87+
6788
test-ad-server-kubernetes:
6889
#runs-on: ubuntu-latest
6990
# need to explicitly use 20.04 to avoid problems with jq...
@@ -85,22 +106,25 @@ jobs:
85106
run: ./tests/test-samba-ad-server-kubernetes.sh
86107

87108
push:
88-
89-
# verify it passes build and test first
90-
needs: test-server
91-
109+
# verify it passes the test jobs first
110+
needs:
111+
- test-server
112+
- test-nightly-server
113+
- test-ad-server-kubernetes
92114
runs-on: ubuntu-latest
93-
if: github.event_name == 'push' && github.repository == 'samba-in-kubernetes/samba-container'
94-
115+
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/samba-container'
116+
env:
117+
# note: forcing use of podman as we will log in using podman explicilty
118+
CONTAINER_CMD: podman
95119
steps:
96120
- uses: actions/checkout@v2
97121
- name: log in to quay.io
98122
run: podman login -u "${{ secrets.QUAY_USER }}" -p "${{ secrets.QUAY_PASS }}" quay.io
99123
- name: push server image
100-
# note: forcing use of podman here, since we did podman login above
101-
run: make CONTAINER_CMD=podman push-server
124+
run: make push-server
102125
- name: push ad-server image
103-
run: make CONTAINER_CMD=podman push-ad-server
126+
run: make push-ad-server
104127
- name: push client image
105-
# note: forcing use of podman here, since we did podman login above
106-
run: make CONTAINER_CMD=podman push-client
128+
run: make push-client
129+
- name: push nightly server image
130+
run: make push-nightly-server

.github/workflows/nightly-run.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)