add workflow to build and push docker container

This commit is contained in:
2023-07-19 17:49:26 +02:00
parent df25593370
commit f62f6d07f2
+31
View File
@@ -0,0 +1,31 @@
name: Build and Push Docker Container
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image for latest tag
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: daniel156161/pfsense-backup:latest
platforms: linux/amd64