Skip to content

Commit

Permalink
fix: version workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Oct 23, 2024
1 parent 0badd03 commit 461459b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@ jobs:
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
env:
VERSION: ${{ github.head_ref || github.ref_name }}
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/doclytics:${{ env.BRANCH_NAME }}
platforms: linux/amd64,linux/arm64
- name: Build and push to GitHub Container Registry
env:
VERSION: ${{ github.head_ref || github.ref_name }}
uses: docker/build-push-action@v6
with:
context: .
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
env:
VERSION: ${{ github.head_ref || github.ref_name }}
with:
context: .
push: true
Expand All @@ -83,9 +85,11 @@ jobs:
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push to GitHub Container Registry
env:
VERSION: ${{ github.head_ref || github.ref_name }}
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/b-urb/doclytics:${{ env.BRANCH_NAME }}
tags: ghcr.io/b-urb/doclytics:v${{ env.BRANCH_NAME }}
platforms: linux/amd64,linux/arm64
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ FROM rust:1.82

WORKDIR /usr/doclytics
COPY . .
ENV VERSION
RUN cargo install cargo edit
RUN cargo set-version ${{ env.VERSION }}

RUN cargo install --path .


CMD ["doclytics"]

0 comments on commit 461459b

Please sign in to comment.