-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (91 loc) · 2.93 KB
/
Copy pathmain.yml
File metadata and controls
113 lines (91 loc) · 2.93 KB
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
---
name: Build this Docker image
on:
workflow_dispatch:
push:
schedule:
- cron: '11 21 * * 0'
jobs:
php8:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout PHP8
uses: actions/checkout@v3
with:
ref: php8
path: php8
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push PHP8
id: docker_build_8
uses: docker/build-push-action@v3
with:
push: true
tags: devopsansiblede/apache:latest
no-cache: true
context: ./php8/
file: ./php8/Dockerfile
platforms: linux/amd64,linux/arm64
- name: "Push re-tagged PHP8 image"
uses: "akhilerm/tag-push-action@v2.0.0"
with:
src: "devopsansiblede/apache:latest"
dst: |
devopsansiblede/apache:php8
- name: Image digest PHP8
run: echo ${{ steps.docker_build_8.outputs.digest }}
- name: Last Build PHP8
run: sed -i -E "s/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}$/$( date +"%Y-%m-%d %T" )/" ./php8/README.md
- name: Commit last built PHP8
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Last built
commit_user_name: GitHub Actions
commit_user_email: dev@macwinnie.me
repository: ./php8/
php7:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout PHP7
uses: actions/checkout@v3
with:
ref: php7
path: php7
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push PHP7
id: docker_build_7
uses: docker/build-push-action@v3
with:
push: true
tags: devopsansiblede/apache:php7
no-cache: true
context: ./php7/
file: ./php7/Dockerfile
platforms: linux/amd64,linux/arm64
- name: Image digest PHP7
run: echo ${{ steps.docker_build_7.outputs.digest }}
- name: Last Build PHP7
run: sed -i -E "s/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}$/$( date +"%Y-%m-%d %T" )/" ./php7/README.md
- name: Commit last built PHP7
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Last built
commit_user_name: GitHub Actions
commit_user_email: dev@macwinnie.me
repository: ./php7/
...