-
Notifications
You must be signed in to change notification settings - Fork 15
117 lines (114 loc) · 3.55 KB
/
all.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
111
112
113
114
115
116
117
name: build-all
on:
# yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: '10 2 * * 1'
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
dockerimage:
- alpine-ansible
- amazon2-ansible
- amazon2023-ansible
- arch-ansible
- centos7-ansible
- centos8-ansible
- centosstream8-ansible
- centosstream9-ansible
- rocky8-ansible
- rocky9-ansible
- debian10-ansible
- debian11-ansible
- debian12-ansible
- fedora37-ansible
- fedora38-ansible
- fedora39-ansible
- fedora40-ansible
- opensuse_tumbleweed-ansible
- openwrt-ansible
- oracle7-ansible
- ubuntu1804-ansible
- ubuntu2004-ansible
- ubuntu2204-ansible
- ubuntu2404-ansible
platforms:
- linux/amd64
# #- linux/arm64
exclude:
- dockerimage: oracle7-ansible
platforms: linux/arm64
- dockerimage: arch-ansible
platforms: linux/arm64
- dockerimage: centos7-ansible
platforms: linux/arm64
steps:
-
name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: ${{ matrix.dockerimage }}-latest
tags: docker-${{ matrix.dockerimage }}:test
platforms: ${{ matrix.platforms }}
load: true
-
name: Test
run: |
docker run --rm docker-${{ matrix.dockerimage }}:test
-
name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.ref == 'refs/heads/master'
-
name: Build and push to ghcr.io
uses: docker/build-push-action@v5
with:
context: ${{ matrix.dockerimage }}-latest
push: true
tags: ghcr.io/dev-sec/docker-${{ matrix.dockerimage }}:latest
platforms: ${{ matrix.platforms }}
if: github.ref == 'refs/heads/master'
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: github.ref == 'refs/heads/master'
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.dockerimage }}-latest
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-${{ matrix.dockerimage }}:latest
platforms: ${{ matrix.platforms }}
if: github.ref == 'refs/heads/master'
-
name: Update repo description
uses: peter-evans/dockerhub-description@v4
if: github.repository == 'rndmh3ro/docker-ansible' && github.ref == 'refs/heads/master'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/docker-${{ matrix.dockerimage }}
short-description: ${{ github.event.repository.description }}