Skip to content

Commit

Permalink
Fix Git build
Browse files Browse the repository at this point in the history
  • Loading branch information
imshashank committed Nov 13, 2024
1 parent 3a00d78 commit e2477cc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Docker Build and Push
on:
push:
branches:
- '**' # Match all branches
- 'main' # Only trigger push events on main
tags: [ "v*" ]
pull_request:
pull_request: # Keep PR triggers for all branches
workflow_dispatch:

env:
Expand All @@ -14,6 +14,8 @@ env:

jobs:
docker:
# Skip this job if it's a push event on a non-main branch
if: github.event_name != 'push' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -23,6 +25,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# Generate Cargo.lock if it doesn't exist
- name: Generate Cargo.lock
run: |
if [ ! -f "Cargo.lock" ]; then
cargo generate-lockfile
fi
- name: Extract version from Cargo.toml
id: version
run: |
Expand Down

0 comments on commit e2477cc

Please sign in to comment.