From 9287d63c311248332659271ad7a52b204ec41603 Mon Sep 17 00:00:00 2001 From: brandonhs Date: Thu, 4 Jun 2026 14:38:43 -0700 Subject: [PATCH] Move blueos docker build to separate workflow (require -blueos) --- .github/workflows/blueos.yml | 54 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 35 ++--------------------- 2 files changed, 57 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/blueos.yml diff --git a/.github/workflows/blueos.yml b/.github/workflows/blueos.yml new file mode 100644 index 00000000..99437cb8 --- /dev/null +++ b/.github/workflows/blueos.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1e7b5fa..c20fdef6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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" @@ -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