From 15f7315c0f9b8b2f77f48103e1169b95c3121867 Mon Sep 17 00:00:00 2001 From: Yohan9206 <54261041+Yohan9206@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:26:28 +0300 Subject: [PATCH] Update imageBuild.yml --- .github/workflows/imageBuild.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/imageBuild.yml b/.github/workflows/imageBuild.yml index 8b13789179..24f3e7fe06 100644 --- a/.github/workflows/imageBuild.yml +++ b/.github/workflows/imageBuild.yml @@ -1 +1,20 @@ - +name: Build Docker Image +on: + pull_request: + types: + - closed +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + push: true + tags: ghcr.io/username/repo:pr-${{ github.event.pull_request.number }} + labels: type=pr,event=merge + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}