Initial commit #1
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: Release Github Package | |
on: | |
push: | |
branches: | |
- 'main' | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Build and Push PHP-FPM | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./php-fpm | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ github.repository }}:php-fpm-main | |
platforms: linux/amd64,linux/arm64 | |
- name: Build and Push Nginx | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./nginx | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ github.repository }}:nginx-main | |
platforms: linux/amd64,linux/arm64 | |
build-args: IMAGE_PHP=${{ env.REGISTRY }}/${{ github.repository }}:php-fpm-main |