Skip to content

Commit

Permalink
Merge pull request #99 from rGunti/release-tags
Browse files Browse the repository at this point in the history
now using "latest" tag
  • Loading branch information
rGunti authored Mar 25, 2023
2 parents 3c21697 + 95d4947 commit d929eab
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/release-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
dockerfile_path: src/FloppyBot.Chat.Agent/Dockerfile
image_name: floppybot/chat-agent
image_tag: ${{ github.ref_name }}
push_latest: true
secrets:
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -24,6 +25,7 @@ jobs:
dockerfile_path: src/FloppyBot.Commands.Executor.Agent/Dockerfile
image_name: floppybot/command-executor
image_tag: ${{ github.ref_name }}
push_latest: true
secrets:
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -35,6 +37,7 @@ jobs:
dockerfile_path: src/FloppyBot.Commands.Parser.Agent/Dockerfile
image_name: floppybot/command-parser
image_tag: ${{ github.ref_name }}
push_latest: true
secrets:
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -46,6 +49,7 @@ jobs:
dockerfile_path: src/FloppyBot.Aux.MessageCounter.Agent/Dockerfile
image_name: floppybot/message-counter
image_tag: ${{ github.ref_name }}
push_latest: true
secrets:
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -57,6 +61,7 @@ jobs:
dockerfile_path: src/FloppyBot.WebApi.Agent/Dockerfile
image_name: floppybot/web-api
image_tag: ${{ github.ref_name }}
push_latest: true
secrets:
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
32 changes: 31 additions & 1 deletion .github/workflows/template-release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ on:
image_tag:
required: true
type: string
push_release:
required: false
type: boolean
default: false
push_latest:
required: false
type: boolean
default: false
secrets:
docker_hub_username:
required: true
Expand Down Expand Up @@ -41,7 +49,7 @@ jobs:
# Build
- name: Set Version
run: echo "${{ inputs.image_tag }}" > ./version
- name: Build and push
- name: Build and push (${{ inputs.image_tag }})
uses: docker/build-push-action@v3
with:
context: ${{ inputs.dockerfile_context }}
Expand All @@ -51,3 +59,25 @@ jobs:
tags: ${{ inputs.image_name }}:${{ inputs.image_tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push (latest)
if: ${{ inputs.push_latest }}
uses: docker/build-push-action@v3
with:
context: ${{ inputs.dockerfile_context }}
file: ${{ inputs.dockerfile_path }}
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ inputs.image_name }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push (release)
if: ${{ inputs.push_release }}
uses: docker/build-push-action@v3
with:
context: ${{ inputs.dockerfile_context }}
file: ${{ inputs.dockerfile_path }}
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ inputs.image_name }}:release
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit d929eab

Please sign in to comment.