Skip to content

Merge pull request #4 from merlos/feature/docker-release-action #2

Merge pull request #4 from merlos/feature/docker-release-action

Merge pull request #4 from merlos/feature/docker-release-action #2

Workflow file for this run

name: Test Docker Image Build
on:
push:
tags:
- '*.*.*' # Matches tags like 0.1.0, etc. that are the ones used on
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Get version number from branch name
id: get_version
run: |
# Extract the version number directly from the tag name
VERSION=$(echo "${{ github.ref_name }}" | sed 's/refs\/tags\///')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Output the version number
run: echo "Version that will be built ${{ env.VERSION }}"
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag broken-links:${{ env.VERSION }}-$(date +%Y-%m-%d)