mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
42 lines
1008 B
YAML
42 lines
1008 B
YAML
name: Build and Push Nginx MariaDB Docker Image
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'docker/ubuntu_nginx_mariadb/**'
|
|
pull_request:
|
|
paths:
|
|
- 'docker/ubuntu_nginx_mariadb/**'
|
|
|
|
jobs:
|
|
build-and-push-nginx:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
strategy:
|
|
matrix:
|
|
platform: [linux/amd64, linux/arm64] # Build for both x86_64 and ARM
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push Nginx MariaDB image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: ./docker/ubuntu_nginx_mariadb
|
|
push: true
|
|
tags: openpanel/nginx-mariadb:latest
|
|
platforms: ${{ matrix.platform }} # Specify the platform from the matrix
|