Skip to content

Commit

Permalink
ci: use docker bake to publish 3 images instead of just 1
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Jul 26, 2024
1 parent 4906b4f commit 0ca83bd
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,27 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.BLIBLA_SEMANTIC_RELEASE }}

- name: Build image and push it to Docker Hub
if: steps.semanticrelease.outputs.new-release-published == 'true'
uses: docker/build-push-action@v5
- name: Set environment variables
run: |
echo "DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO }}" >> $GITHUB_ENV
echo "DOCKERHUB_IMG=${{ vars.DOCKERHUB_IMG }}" >> $GITHUB_ENV
echo "HUGGINGFACE_ACCESS_TOKEN=${{ secrets.HUGGINGFACE_ACCESS_TOKEN }}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${{ steps.semanticrelease.outputs.release-version }}" >> $GITHUB_ENV
- name: Build and push the images to Docker Hub
uses: docker/bake-action@v2
with:
push: true
tags: |
${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}:${{ steps.semanticrelease.outputs.release-version }}
set: |
*.args.DOCKERHUB_REPO=${{ env.DOCKERHUB_REPO }}
*.args.DOCKERHUB_IMG=${{ env.DOCKERHUB_IMG }}
*.args.RELEASE_VERSION=${{ env.RELEASE_VERSION }}
sd3.args.HUGGINGFACE_ACCESS_TOKEN=${{ env.HUGGINGFACE_ACCESS_TOKEN }}
- name: Update description on Docker Hub
if: steps.semanticrelease.outputs.new-release-published == 'true'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}
repository: ${{ env.DOCKERHUB_REPO }}/${{ env.DOCKERHUB_IMG }}

0 comments on commit 0ca83bd

Please sign in to comment.