Skip to content

Commit

Permalink
chore: docker build fix (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeeshan Lakhani authored Feb 21, 2024
1 parent 3c7c56a commit 38b99be
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,18 @@ jobs:
sudo rm -rf /usr/share/dotnet
- name: Install cargo-get
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.force-builds)
run: cargo install cargo-get

- name: Set Current Version
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.force-builds)
id: crate-version
id: crate-version-dispatch
run: echo version=$(cargo get workspace.package.version)-rc.$(date +%s) >> $GITHUB_OUTPUT

- name: Set Current Version
if: github.event_name != 'workflow_dispatch'
id: crate-version
run: echo version=$(cargo get workspace.package.version) >> $GITHUB_OUTPUT

- name: Set Env
run: |
echo "GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand All @@ -347,20 +351,19 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Metadata
if: github.event_name != 'workflow_dispatch'
id: meta-release
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.force-builds)
id: meta-dispatch
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}},value=${{ steps.crate-version-dispatch.outputs.version }}
type=raw,value=latest
type=sha
- name: Metadata
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.force-builds)
id: meta-dispatch
if: github.event_name != 'workflow_dispatch'
id: meta-release
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand Down

0 comments on commit 38b99be

Please sign in to comment.