Skip to content

Commit

Permalink
Added release action
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Aug 13, 2024
1 parent c99b122 commit 7fec35f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to Dockerhub

on:
workflow_dispatch:
push:
tags:
- "*"

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
cache: "sbt"
- name: Package and publish
run: |
export VCS_REF=`git tag | sort -V | grep -E '^\d' | tail -1`
sbt 'Docker / stage'
cd oni/target/docker/stage
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
docker buildx create --name dockerbuilder --platform linux/amd64,linux/arm64 --use
docker buildx build --platform linux/amd64,linux/arm64 -t mbari/oni:${VCS_REF} -t mbari/oni:latest --push -f Dockerfile

0 comments on commit 7fec35f

Please sign in to comment.