-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (104 loc) · 4.19 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: ci
on:
push:
pull_request:
schedule:
- cron: '0 5 * * 3'
jobs:
build_python:
runs-on: ubuntu-24.04
strategy:
matrix:
python_version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
name: "Build python:${{ matrix.python_version}}"
env:
FULL_IMAGE_NAME: "ghcr.io/${{ github.repository }}/python"
steps:
- uses: actions/checkout@main
- name: Build
run: |
podman build --file python/Dockerfile \
--tag ${FULL_IMAGE_NAME}:${{ matrix.python_version }} \
--build-arg PYTHON_VERSION=${{ matrix.python_version }} \
--label org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)" \
--label org.opencontainers.image.revision="${GITHUB_SHA}"
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
podman login ghcr.io -u ${{ github.actor }} --password-stdin <<< ${{ secrets.GITHUB_TOKEN }}
podman push ${FULL_IMAGE_NAME}:${{ matrix.python_version }}
build_java:
runs-on: ubuntu-24.04
strategy:
matrix:
java_version: [ '17', '21' ]
name: "Build java-maven:${{ matrix.java_version}}"
env:
FULL_IMAGE_NAME: "ghcr.io/${{ github.repository }}/java-maven"
steps:
- uses: actions/checkout@main
- name: Build
run: |
podman build --file java-maven/Dockerfile \
--tag ${FULL_IMAGE_NAME}:${{ matrix.java_version }} \
--build-arg JAVA_VERSION=${{ matrix.java_version }} \
--label org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)" \
--label org.opencontainers.image.revision="${GITHUB_SHA}"
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
podman login ghcr.io -u ${{ github.actor }} --password-stdin <<< ${{ secrets.GITHUB_TOKEN }}
podman push ${FULL_IMAGE_NAME}:${{ matrix.java_version }}
build_shellcheck:
runs-on: ubuntu-24.04
strategy:
matrix:
shellcheck_version: [ '0.10.0' ]
name: "Build shellcheck:${{ matrix.shellcheck_version}}"
env:
FULL_IMAGE_NAME: "ghcr.io/${{ github.repository }}/shellcheck"
steps:
- uses: actions/checkout@main
- name: Build
run: |
podman build --file shellcheck/Dockerfile \
--tag ${FULL_IMAGE_NAME}:${{ matrix.shellcheck_version }} \
--build-arg SHELLCHECK_VERSION=${{ matrix.shellcheck_version }} \
--label org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)" \
--label org.opencontainers.image.revision="${GITHUB_SHA}"
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
podman login ghcr.io -u ${{ github.actor }} --password-stdin <<< ${{ secrets.GITHUB_TOKEN }}
podman push ${FULL_IMAGE_NAME}:${{ matrix.shellcheck_version }}
build_clangformat:
runs-on: ubuntu-24.04
strategy:
matrix:
clangformat_version: [ '14.0.6', '16.0.6', '17.0.6', '18.1.8', '19.1.4' ]
name: "Build clang-format:${{ matrix.clangformat_version}}"
env:
FULL_IMAGE_NAME: "ghcr.io/${{ github.repository }}/clang-format"
FULL_VERSION: "${{ matrix.clangformat_version }}"
steps:
- uses: actions/checkout@main
- name: Build
run: |
podman build --file clang-format/Dockerfile \
--tag ${FULL_IMAGE_NAME}:${FULL_VERSION%%.*} \
--build-arg CLANGFORMAT_VERSION=${{ matrix.clangformat_version }} \
--label org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)" \
--label org.opencontainers.image.revision="${GITHUB_SHA}"
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
podman login ghcr.io -u ${{ github.actor }} --password-stdin <<< ${{ secrets.GITHUB_TOKEN }}
podman push ${FULL_IMAGE_NAME}:${FULL_VERSION%%.*}
hadolint:
runs-on: ubuntu-24.04
name: "Hadolint"
steps:
- uses: actions/checkout@main
- uses: hadolint/hadolint-action@v3.1.0
with:
recursive: true