Skip to content

Commit

Permalink
Merge pull request #478 from hyperledger-labs/publish-arm
Browse files Browse the repository at this point in the history
Publish ARM image for Fablo
  • Loading branch information
dzikowski authored Sep 9, 2024
2 parents bc6d5eb + 7c65c0d commit 7ae3b69
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 51 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/publish-docker-on-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Build Fablo
run: |
shellcheck --version
yamllint -v
npm install
./fablo-build.sh
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish Docker image
- name: Build and push Docker image
run: |
FABLO_VERSION=$(jq -r '.version' <"$GITHUB_WORKSPACE/package.json")
docker push softwaremill/fablo:"$FABLO_VERSION"
shellcheck --version
yamllint -v
npm install
./fablo-build.sh --push
20 changes: 15 additions & 5 deletions fablo-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@ fi
npm install
npm run build:dist

docker build \
--build-arg VERSION_DETAILS="$VERSION_DETAILS" \
--tag "$IMAGE_BASE_NAME" "$FABLO_HOME"

docker tag "$IMAGE_BASE_NAME" "softwaremill/fablo:$FABLO_VERSION"
# if --push is passed, then build for all platforms and push the image to the registry
if [ "${1:-''}" = "--push" ]; then
docker buildx build \
--build-arg VERSION_DETAILS="$VERSION_DETAILS" \
--platform linux/amd64,linux/arm64 \
--tag "softwaremill/fablo:$FABLO_VERSION" \
--push \
"$FABLO_HOME"
else
docker build \
--build-arg VERSION_DETAILS="$VERSION_DETAILS" \
--tag "$IMAGE_BASE_NAME" "$FABLO_HOME"

docker tag "$IMAGE_BASE_NAME" "softwaremill/fablo:$FABLO_VERSION"
fi
36 changes: 0 additions & 36 deletions fablo-release.sh

This file was deleted.

0 comments on commit 7ae3b69

Please sign in to comment.