Skip to content

Commit

Permalink
👷 Add Github Action to build and deploy dev image when merged to master
Browse files Browse the repository at this point in the history
  • Loading branch information
haynescd committed Sep 5, 2024
1 parent 645d888 commit c315bca
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Publish Image

on:
push:
branches:
- "main"

permissions:
contents: read
id-token: write

jobs:
build-publish-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build and Publish Image"
run: |
docker build . --tag ghcr.io/kids-first/kf-api-dataservice/kf-api-dataservice:post-release-${ git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 1-7 }-${GITHUB_SHA:0:7}
docker push ghcr.io/kids-first/kf-api-dataservice/kf-api-dataservice:post-release-${ git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 1-7 }-${GITHUB_SHA:0:7}

0 comments on commit c315bca

Please sign in to comment.