Skip to content

Commit

Permalink
Update GitHub Workflow for tag generation
Browse files Browse the repository at this point in the history
The commit introduces a step within the GitHub Workflow to generate Docker tags. This is done before building and pushing the Docker image. The tag is now dynamically created based on the current timestamp, improving version control for Docker images.
  • Loading branch information
stitts-dev committed May 23, 2024
1 parent 90af309 commit a66bc23
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/deploy-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2

- name: Generate Docker tag
id: generate_tag # Give an ID to this step to use its outputs
run: echo "::set-output name=tag::hugo-site:$(date +%s)"checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -21,5 +25,6 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: hugo-site:$(date +%s)
tags: ${{ steps.generate_tag.outputs.tag }}

0 comments on commit a66bc23

Please sign in to comment.