Skip to content

Commit

Permalink
Merge pull request #7 from airbnb/zparekh/custom_PR_build
Browse files Browse the repository at this point in the history
Run Build image (github workflow) for custom PR
  • Loading branch information
zarna1parekh authored Aug 23, 2024
2 parents 95e520a + 5cd7ae6 commit ad8a1d0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Build and Push Docker Image CI
on:
push:
branches: [ "airbnb-main" ]
workflow_dispatch: # This allows manual triggering of the workflow on any branch
inputs:
branch:
description: 'Branch to run the workflow on'
required: true
default: 'airbnb-main'

jobs:

Expand All @@ -23,7 +29,8 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
- name: Build and push Docker image (for airbnb-main branch)
if: github.ref_name == 'airbnb-main'
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -32,3 +39,13 @@ jobs:
tags: |
airbnb/airtrace:latest
airbnb/airtrace:${{ github.sha }}
- name: Build and push Docker image (for non airbnb-main branch)
if: github.ref_name != 'airbnb-main'
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
airbnb/airtrace:${{ github.sha }}

0 comments on commit ad8a1d0

Please sign in to comment.