Skip to content

Commit

Permalink
build: update manual Docker workflow to retrieve and use the latest t…
Browse files Browse the repository at this point in the history
…ag for versioned images
  • Loading branch information
sean1832 committed Mar 3, 2025
1 parent 8adc1b1 commit 823ac28
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build-docker-manual.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build & Publish to Docker Hub Manually

on:
[workflow_dispatch]
on: [workflow_dispatch]

jobs:
publish_image:
Expand All @@ -13,8 +12,15 @@ jobs:
- name: Build latest image
run: docker build -t sean1832/wolite:latest .

- name: Get Latest Tag
id: get_latest_tag
run: |
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "LATEST_TAG=${latest_tag}"
echo "LATEST_TAG=${latest_tag}" >> $GITHUB_ENV
- name: Build versioned image
run: docker build -t sean1832/wolite:${{ github.event.release.tag_name }} .
run: docker build -t sean1832/wolite:${{ env.LATEST_TAG }} .

- name: login to docker hub
run: docker login -u sean1832 -p ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down

0 comments on commit 823ac28

Please sign in to comment.