-
Notifications
You must be signed in to change notification settings - Fork 102
45 lines (38 loc) · 1.31 KB
/
publish_docker_images_cron.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
45
name: Schedule Build Docker Images For Main Images And Nightly
on:
schedule:
- cron: 30 0 * * *
push:
branches:
- "**"
env:
DOCKERHUB_USER_NAME: ${{ secrets.DOCKERHUB_USER_NAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
jobs:
build_and_publish_images:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image_type:
- latest
- alpine
- postgres_14
- nightly
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Clone tools branch
run: git clone -b v0.8.30 --depth=1 https://github.com/citusdata/tools.git tools
- name: Install package dependencies
run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install python requirements
run: python -m pip install -r tools/packaging_automation/requirements.txt
- name: DockerHub Login
run: docker login -u "${DOCKERHUB_USER_NAME}" -p "${DOCKERHUB_PASSWORD}"
- name: Build and publish docker images
run: |
python -m tools.packaging_automation.publish_docker \
--pipeline_trigger_type "${GITHUB_EVENT_NAME}" \
--github_ref "${GITHUB_REF}" \
--image_type "${{ matrix.image_type }}"