Skip to content

Commit

Permalink
add feature branch specific docker
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu17 committed Jan 30, 2025
1 parent b99d9f4 commit 83376e6
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Push Docker Images

on:
push:
branches: [develop, 'GEN*', 'gen*']
paths:
- 'geniesp/**'
- '.github/workflows/build-docker-images.yml'
workflow_dispatch:

jobs:
build_references_docker:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: sage-bionetworks/genie-sponsored-projects
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image for geniesp
uses: docker/build-push-action@v5
with:
context: geniesp
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-cache
cache-to: type=inline,mode=max

0 comments on commit 83376e6

Please sign in to comment.