Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/blueos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build Docker Image
on:
push:
tags:
- "*-blueos"
workflow_dispatch:

permissions:
contents: read

jobs:
build_docker_image:
runs-on: ubuntu-22.04-arm
env:
DOCKER_TAG: ${{ github.ref_name }}
DOCKER_REPO: deepwaterexploration/dwe_os_2
steps:
- name: "Checkout code"
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Set up Node.js"
uses: actions/setup-node@v6
with:
node-version: "22"

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v4
with:
platforms: linux/arm/v7,linux/arm64

- name: "Log in to Docker Hub"
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: "Build Project"
run: |
./create_release.sh

- name: "Build and Push Docker Image"
uses: docker/build-push-action@v7
with:
context: .
file: docker/Dockerfile
platforms: linux/arm64,linux/arm/v7
push: true
tags: |
${{ env.DOCKER_REPO }}:${{ env.DOCKER_TAG }}
${{ env.DOCKER_REPO }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
35 changes: 3 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ permissions:
contents: write # Required to upload release assets

jobs:
build_docker_image:
runs-on: ubuntu-22.04-arm

env:
DOCKER_TAG: ${{ github.ref_name == 'main' && 'dev' || github.ref_name }}

DOCKER_REPO: deepwaterexploration/dwe_os_2
build:
runs-on: ubuntu-22.04

steps:
- name: "Checkout code"
Expand All @@ -29,39 +24,15 @@ jobs:
with:
node-version: "22"

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v4
with:
platforms: linux/arm/v7,linux/arm64

- name: "Log in to Docker Hub"
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: "Build Project"
run: |
./create_release.sh

- name: "Build Docker Image"
uses: docker/build-push-action@v7
with:
context: .
file: docker/Dockerfile
platforms: linux/arm64,linux/arm/v7
push: true
tags: |
${{ env.DOCKER_REPO }}:${{ env.DOCKER_TAG }}
${{ startsWith(github.ref, 'refs/tags/') && format('{0}:latest', env.DOCKER_REPO) || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: "Create Release and Upload Asset"
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: release.tar.gz
generate_release_notes: true
draft: false
draft: true
prerelease: false
Loading