PHP73 Docker Image Publish #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |