Skip to content

Commit

Permalink
Merge pull request #3 from simonsobs/koopman/build-dev-images
Browse files Browse the repository at this point in the history
Add build and push for development images on push to `main`
  • Loading branch information
guanyilun authored Jul 25, 2023
2 parents 8000b0b + 9744c82 commit 15a4934
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Publish Images to Container Registries
on:
release:
types: [ released ]
push:
branches: [ main ]
pull_request:

jobs:
Expand All @@ -12,6 +14,11 @@ jobs:
contents: read
packages: write
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -36,14 +43,20 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
- name: Build Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
simonsobs/scheduler-server
ghcr.io/simonsobs/scheduler-server
tags: |
type=raw,value=${{ env.docker_tag }}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
- name: Build and push images
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: |
simonsobs/scheduler-server:latest
simonsobs/scheduler-server:${{ env.docker_tag }}
ghcr.io/simonsobs/scheduler-server:latest
ghcr.io/simonsobs/scheduler-server:${{ env.docker_tag }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 15a4934

Please sign in to comment.