Skip to content

Commit

Permalink
Merge pull request #92 from Sage-Bionetworks/bwmac/IBCDPE-386/ghcr_ci
Browse files Browse the repository at this point in the history
[IBCDPE-386] Adds CI step to publish GHCR container
  • Loading branch information
BWMac authored Oct 10, 2023
2 parents 1c074f8 + 3ac5396 commit 6a3c18a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ name: CI
on:
push:
branches: ["dev"]
# Match tags that resemble a version
tags: ['[0-9]+\.[0-9]+\.[0-9]+']
pull_request:

# Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -56,3 +58,36 @@ jobs:
- run: pip install -U setuptools
- run: pip install .
- run: adt test_config.yaml -t ${{secrets.SYNAPSE_PAT}}

ghcr-publish:
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=sha
latest
- name: Publish Docker Image
uses: docker/build-push-action@v3
with:
context: .
build-args: |
TARBALL_PATH=${{ needs.prepare.outputs.tarball-path }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 6a3c18a

Please sign in to comment.