Skip to content

Commit

Permalink
build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
antondlr committed Jun 20, 2024
1 parent 1ce8d5e commit 9d1841f
Showing 1 changed file with 3 additions and 34 deletions.
37 changes: 3 additions & 34 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- unstable
- stable
- fix-workflows
tags:
- v*

Expand Down Expand Up @@ -41,32 +42,6 @@ jobs:
outputs:
VERSION: ${{ env.VERSION }}
VERSION_SUFFIX: ${{ env.VERSION_SUFFIX }}
build-html:
name: build html
runs-on: ubuntu-22.04
needs: [extract-version]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use node 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
env:
NODE_ENV: development
run: |
yarn
- name: Build Siren
env:
NODE_ENV: production
run: yarn build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: html
path: build/

build-docker-single-arch:
name: build-docker-${{ matrix.binary }}
Expand All @@ -75,7 +50,7 @@ jobs:
matrix:
binary: [aarch64, x86_64]

needs: [extract-version, build-html]
needs: [extract-version]
env:
# We need to enable experimental docker features in order to use `docker buildx`
DOCKER_CLI_EXPERIMENTAL: enabled
Expand All @@ -93,18 +68,12 @@ jobs:
- name: Map x86_64 to amd64 short arch
if: startsWith(matrix.binary, 'x86_64')
run: echo "SHORT_ARCH=amd64" >> $GITHUB_ENV;
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: html
path: html/
- name: Build Dockerfile and push
run: |
docker buildx build \
--platform=linux/${SHORT_ARCH} \
--file ./Dockerfile.release . \
--file ./Dockerfile . \
--tag ${IMAGE_NAME}:${VERSION}-${SHORT_ARCH}${VERSION_SUFFIX} \
--provenance=false \
--push
build-docker-multiarch:
Expand Down

0 comments on commit 9d1841f

Please sign in to comment.