-
Notifications
You must be signed in to change notification settings - Fork 98
44 lines (37 loc) · 1.25 KB
/
ci.yml
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
# See reference docs at
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Default branch ci
on:
workflow_dispatch:
push:
branches:
- master
jobs:
ci:
runs-on: ubuntu-22.04
steps:
- name: Clone the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
submodules: recursive
- name: Check if container should be published
id: checks
run: echo container-published=$(./.ci/check-container-version-published) >> $GITHUB_OUTPUT
- name: Build container
if: steps.checks.outputs.container-published == 'false'
run: ./.ci/build-container
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Publish container
if: steps.checks.outputs.container-published == 'false'
run: ./.ci/publish-container
- name: Pull CI container image
if: steps.checks.outputs.container-published == 'true'
run: ./.ci/pull-container
- name: Run CI in container
run: ./.ci/run-container-ci ${{github.workspace}} ${{ github.event.before }}