Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Woozl committed May 7, 2024
1 parent 2ad0d75 commit 45d04be
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
name: "Push to Github Container Registry"
name: Create and publish a Docker image

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
publish:
name: Push bdc-program-studies to GHCR.
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Push bdc-program-studies
uses: docker/build-push-action@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
path: .
dockerfile: ./Dockerfile
repository: stagecc/bdc-program-studies
tags: latest,${{ steps.get_version.outputs.VERSION }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
build-args: VITE_DUG_SEARCH_API=https://search-dev.biodatacatalyst.renci.org
platform: linux/amd64
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 45d04be

Please sign in to comment.