From 42de9d723f36efb44b027762a598f16493bd07e0 Mon Sep 17 00:00:00 2001 From: Bagas Aulia Rezki Date: Sun, 8 Sep 2024 17:35:27 +0700 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..38daa23 --- /dev/null +++ b/.github/workflows/main.yml @@ -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