Skip to content

Commit

Permalink
Merge pull request #2 from merlos/feature/create-docker-image
Browse files Browse the repository at this point in the history
Create docker-image.yml for release branches
  • Loading branch information
merlos authored Aug 10, 2024
2 parents 1f7a3a4 + d08df2c commit b8c4e48
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Docker Image CI

on:
push:
branches: [ "release/*" ]

jobs:

build-docker-image:

runs-on: ubuntu-latest
steps:
- name: Get version number from branch name
id: get_version
run: |
# Extract the version number by removing the 'release/' prefix
VERSION=$(echo "${{ github.ref_name }}" | sed 's/release\///')
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 +%s)

0 comments on commit b8c4e48

Please sign in to comment.