-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate docker build/deploy to ghcr.io
- Loading branch information
Showing
5 changed files
with
58 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Docker image deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "backend/**" | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Docker image tag' | ||
required: true | ||
default: 'latest' | ||
|
||
jobs: | ||
vercel-deploy: | ||
name: Vercel deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Builder | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
run: | | ||
cd backend/ | ||
INPUT_TAG=${{ github.event.inputs.tag }} | ||
TAG=${INPUT_TAG:-"latest"} | ||
docker build -t ghcr.io/flatironinstitute/stan-wasm-server:$TAG . | ||
docker push ghcr.io/flatironinstitute/stan-wasm-server:$TAG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters