-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.01 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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: 'Get Previous tag'
id: latest_tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.0.1
- name: Package and publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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:${{ steps.latest_tag.outputs.tag }} -t mbari/oni:latest --push .