Skip to content

chore: bump docker image tag #6

chore: bump docker image tag

chore: bump docker image tag #6

Workflow file for this run

name: docker
on:
workflow_dispatch:
push:
branches:
- docker
paths:
- .github/workflows/docker.yml
- Dockerfile
env:
IMAGE_NAME: recap
CONTEXT: "./"
NAMESPACE: nciccbr
VERSION_TAG: 0.2.1
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare build-time variables
id: vars
run: |
echo "DATE=$(date +"%Y-%m-%d")" >> "$GITHUB_OUTPUT"
- name: debug
run: |
echo "the github tag is ${{ github.ref_name }}"
echo "github event_name is ${{ github.event_name }}"
echo "the version tag is ${{ env.VERSION_TAG }}"
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.VERSION_TAG }}
context: ${{ env.CONTEXT }}
file: ${{ env.CONTEXT }}/Dockerfile
build-args: |
BUILD_DATE=${{ steps.vars.outputs.DATE }}
BUILD_TAG=${{ env.VERSION_TAG }}
REPONAME=${{ env.IMAGE_NAME }}