From 9209453336f0807266130ec9c564a6157abc29a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piyush=20=E0=A4=AE=E0=A4=BF=E0=A4=B6=E0=A5=8D=E0=A4=B0?= Date: Wed, 6 Dec 2023 20:56:29 +0530 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..cddf883 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,28 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + push-store-image: + runs-on: ubuntu-latest + + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@main + + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + + - name: 'Build Inventory Image' + run: | + docker build . --tag ghcr.io/${{GITHUB_REPOSITORY}}:main + docker push ghcr.io/${{GITHUB_REPOSITORY}}:main +