Create main.yml

This commit is contained in:
2024-09-08 17:35:27 +07:00
committed by GitHub
parent 06f6063f4d
commit 42de9d723f

27
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Docker Build and Push
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:latest