Skip to content

Commit

Permalink
Only do docker builds when releases are pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed May 16, 2024
1 parent 9f21967 commit d06056a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ name: Publish Docker image on release
on:
release:
types: [published]
push:
branches: main

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
if: github.repository == 'datatractor/yard' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out the repo
uses: actions/checkout@v4
Expand All @@ -29,7 +28,7 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: mlevs/datatractor-yard
tags: type=sha
tags: type=ref,event=tag
flavor: latest=true

- name: Build and push Docker image
Expand Down

0 comments on commit d06056a

Please sign in to comment.