Run pipeline #3
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: Publish Docker Images | |
on: | |
push: | |
branches: | |
- main | |
- 1-dockerize-the-project | |
jobs: | |
publish-docker-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Nginx Docker Image | |
run: | | |
docker buildx create --use | |
docker buildx build --cache-from ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-nginx:latest --tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-nginx:latest --platform linux/amd64,linux/arm64 --push --file Dockerfile.nginx . | |
- name: Build and Push PHP Docker Image | |
run: | | |
docker buildx create --use | |
docker buildx build --cache-from ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-php:latest --tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-php:latest --platform linux/amd64,linux/arm64 --push --file Dockerfile.php-fpm . | |
- name: Build and Push MariaDB Docker Image | |
run: | | |
docker buildx create --use | |
docker buildx build --cache-from ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-mariadb:latest --tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-mariadb:latest --platform linux/amd64,linux/arm64 --push --file Dockerfile.mariadb . |