Skip to content

Commit

Permalink
fix: docker metadata from release please
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaisberg authored and Gaisberg committed Jul 24, 2024
1 parent d30679d commit d52f4cd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
47 changes: 28 additions & 19 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Docker Build and Push

on:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -40,21 +40,30 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Read VERSION file
id: version
run: echo "VERSION=$(cat version.txt)" >> "$GITHUB_OUTPUT"

- name: Build and push Docker image
uses: docker/[email protected]
- name: Build Docker Metadata
id: docker-metadata
uses: docker/metadata-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/rivenmedia/riven:latest
ghcr.io/rivenmedia/riven:${{ steps.version.outputs.VERSION }}
docker.io/spoked/riven:latest
docker.io/spoked/riven:${{ steps.version.outputs.VERSION }}
images: |
ghcr.io/rivenmedia/riven
docker.io/spoked/riven
flavor: |
latest=auto
tags: |
type=ref,event=tag
type=sha,commit=${{ github.sha }}
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Push Service Image to repo
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
provenance: mode=max
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ ENV PATH="/app/.venv/bin:$PATH"
# Copy the rest of the application code
COPY src/ /riven/src
COPY pyproject.toml poetry.lock /riven/src/
COPY version.txt entrypoint.sh /riven/

# Ensure entrypoint script is executable
RUN chmod +x /riven/entrypoint.sh
Expand Down

0 comments on commit d52f4cd

Please sign in to comment.