Skip to content

Commit

Permalink
Update github-actions with feature branches rule
Browse files Browse the repository at this point in the history
  • Loading branch information
san99tiago committed Aug 28, 2023
1 parent 45dc88e commit 51fd305
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: FastAPI Docker Image Test, Build and Push to DockerHub

on:
push:
branches: [ "main" ]
branches: [ "main", "feature/**"]
pull_request:
branches: [ "main" ]
branches-ignore: [ "docs" ]

jobs:

Expand Down Expand Up @@ -70,7 +71,7 @@ jobs:
images: san99tiago/fastapi-docker-github-actions

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
if: github.event_name != "pull_request"
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -80,6 +81,6 @@ jobs:
uses: docker/build-push-action@v4
with:
context: src
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != "pull_request" }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 51fd305

Please sign in to comment.