This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Build docker images #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |