Skip to content

Commit

Permalink
Add publish of build container
Browse files Browse the repository at this point in the history
This is used as a base for detector developer containers
on where they have the full dev environment but also
have odin-data installed in /odin to build against.
  • Loading branch information
GDYendell committed Jun 24, 2024
1 parent 299501d commit 6f3ee85
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,34 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1

- name: Docker meta config developer
id: meta-developer
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}-developer
tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest
- name: Docker build developer image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
target: developer
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-build.outputs.tags }}
labels: ${{ steps.meta-build.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache


- name: Docker meta config build
id: meta-build
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}-developer
images: ghcr.io/${{ github.repository }}-build
tags: |
type=ref,event=branch
type=ref,event=tag
Expand All @@ -69,7 +92,7 @@ jobs:
with:
context: .
file: Dockerfile
target: developer
target: build
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-build.outputs.tags }}
labels: ${{ steps.meta-build.outputs.labels }}
Expand Down

0 comments on commit 6f3ee85

Please sign in to comment.