mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Added container building working
This commit is contained in:
parent
a33fd44435
commit
990baea47c
1 changed files with 48 additions and 0 deletions
48
.github/workflows/build-container.yml
vendored
Normal file
48
.github/workflows/build-container.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: build and publish containers
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
jobs:
|
||||
build-magellan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check out the repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: |
|
||||
ghcr.io/openchami/magellan
|
||||
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern=v{{version}}
|
||||
type=semver,pattern=v{{major}}.{{minor}}
|
||||
type=semver,pattern=v{{major}}
|
||||
type=sha
|
||||
- name: setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to github container repo
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push magellan
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue