From d93adce5f15bbaa47a83ff532f751c800b207326 Mon Sep 17 00:00:00 2001 From: Murilo Kakazu Date: Mon, 29 Jul 2024 01:07:14 -0300 Subject: [PATCH] feat: push image to dockerhub --- .github/workflows/cd.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cd.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..f79b8f1 --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,35 @@ +name: CD + +on: + push: + branches: + - main + +jobs: + build: + 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_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ secrets.DOCKER_USERNAME }}/fast-food:latest + + # TODO: deploy to k8s \ No newline at end of file