From 1ff7c37cdaa6c60b309a335945b0027a885d33e9 Mon Sep 17 00:00:00 2001 From: Kunal Singh Date: Fri, 24 May 2024 21:03:50 +0530 Subject: [PATCH] feat: added docker image --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8f2476e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build docker images + +on: + workflow_dispatch: + +permissions: + contents: write + packages: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - run: git fetch --force --tags + + - name: Set outputs + id: vars + run: echo "::set-output name=latest_tag::$(git describe --tags --abbrev=0)" + + - name: Check outputs + run: echo ${{ steps.vars.outputs.latest_tag }} + + - name: build docker image + run: | + docker build -t ghcr.io/indiabuild/ibtech:${{ steps.vars.outputs.latest_tag }} . + + - name: push docker image + run: | + echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u "kunalsin9h" --password-stdin + + docker push ghcr.io/indiabuild/ibtech:${{ steps.vars.outputs.latest_tag }}