Skip to content

Commit

Permalink
chore(ci): fix docker building on branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Apr 23, 2023
1 parent 3c34104 commit 2a0c5a0
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on: [push]
jobs:
linux64:
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.filenames.outputs.longversion }}
do-docker: ${{ steps.upload.outputs.branch }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -67,13 +70,6 @@ jobs:
api-target: 'linux-tgz'
api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }}

- name: Report docker build is needed
if: ${{ steps.upload.outputs.branch }}
uses: actions/upload-artifact@v3
with:
name: do-docker-build
path: dist/BUILD

linux-arm64:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -343,25 +339,14 @@ jobs:
IMAGE_NAME: companion

steps:
- name: Check if build is required
id: build-check
uses: xSAVIKx/artifact-exists-action@v0
with:
name: do-docker-build

- uses: actions/checkout@v3
if: ${{ steps.build-check.outputs.exists }}

- uses: actions/download-artifact@v3
if: ${{ steps.build-check.outputs.exists }}
with:
name: do-docker-build
if: ${{ needs.linux64.outputs.do-docker }}

- name: Determine target image name
if: ${{ steps.build-check.outputs.exists }}
if: ${{ needs.linux64.outputs.do-docker }}
id: image-name
run: |
BUILD_VERSION=$(cat BUILD)
BUILD_VERSION=${{ needs.linux64.outputs.version }}
IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME
Expand Down

0 comments on commit 2a0c5a0

Please sign in to comment.