Publish PHP Image #58
This file contains hidden or 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: Publish PHP Image | |
| on: | |
| workflow_dispatch: # 手动触发 | |
| schedule: | |
| - cron: '0 0 28 * *' # 每个月的1号00:00(UTC时间) | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push PHP image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: php-fpm/Dockerfile | |
| push: true | |
| tags: kjlion/php:fpm-alpine | |
| platforms: linux/amd64,linux/arm64 |