-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.03 KB
/
docker-publish.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: PHP73 Docker Image Publish
on:
workflow_dispatch:
repository_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to AliYun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-chengdu.aliyuncs.com
username: ${{ secrets.ALIYUN_USER }}
password: ${{ secrets.ALIYUN_TOKEN }}
- name: Build and Push Docker images
uses: docker/build-push-action@v6
with:
file: Dockerfile
context: .
push: true
tags: |
clion007/php73
registry.cn-chengdu.aliyuncs.com/clion/php73:slim
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
retain_days: 0
keep_minimum_runs: 2