mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Create docker-image.yml
This commit is contained in:
parent
387b3a8ae6
commit
d1f041d0da
43
.github/workflows/docker-image.yml
vendored
Normal file
43
.github/workflows/docker-image.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: Build and Push Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
DOCKER_BUILDKIT: 1
|
||||
|
||||
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 image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ./docker/nginx
|
||||
push: true
|
||||
tags: openpanel/nginx:latest
|
||||
|
||||
- name: Build and push Apache image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ./docker/apache
|
||||
push: true
|
||||
tags: openpanel/apache:latest
|
Loading…
Reference in New Issue
Block a user