Skip to content

Commit

Permalink
Merge pull request #492 from hyperledger-labs/set-fablo-io-registry
Browse files Browse the repository at this point in the history
Set Docker registry to ghcr.io/fablo-io/fablo
  • Loading branch information
dzikowski authored Sep 17, 2024
2 parents 882d50c + 5e01148 commit 8ebd31c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker-on-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Build and push Docker image
run: |
Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,28 @@ jobs:
exit 1
fi
- name: Build Fablo
run: |
shellcheck --version
yamllint -v
npm install
./fablo-build.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container

- name: Login to DockerHub
uses: docker/login-action@v1
- name: Login to GHCR
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Publish Docker image
- name: Build and push Docker image
run: |
FABLO_VERSION=$(jq -r '.version' <"$GITHUB_WORKSPACE/package.json")
docker push ghcr.io/hyperledger-labs/fablo:"$FABLO_VERSION"
shellcheck --version
yamllint -v
npm install
./fablo-build.sh --push
- name: Create GitHub Release
uses: "marvinpinto/action-automatic-releases@latest"
- name: Create release
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
docs/schema.json
fablo.sh
Expand Down
6 changes: 3 additions & 3 deletions fablo-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo " FABLO_HOME: $FABLO_HOME"
echo " FABLO_VERSION: $FABLO_VERSION"
echo " VERSION_DETAILS: $VERSION_DETAILS"

IMAGE_BASE_NAME="ghcr.io/hyperledger-labs/fablo:$FABLO_VERSION"
IMAGE_BASE_NAME="ghcr.io/fablo-io/fablo:$FABLO_VERSION"

if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then
set +e
Expand All @@ -37,13 +37,13 @@ if [ "${1:-''}" = "--push" ]; then
docker buildx build \
--build-arg VERSION_DETAILS="$VERSION_DETAILS" \
--platform linux/amd64,linux/arm64 \
--tag "ghcr.io/hyperledger-labs/fablo:$FABLO_VERSION" \
--tag "ghcr.io/fablo-io/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" "ghcr.io/hyperledger-labs/fablo:$FABLO_VERSION"
docker tag "$IMAGE_BASE_NAME" "ghcr.io/fablo-io/fablo:$FABLO_VERSION"
fi
2 changes: 1 addition & 1 deletion fablo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

FABLO_VERSION=1.2.1-unstable.0
FABLO_IMAGE_NAME="ghcr.io/hyperledger-labs/fablo"
FABLO_IMAGE_NAME="ghcr.io/fablo-io/fablo"
FABLO_IMAGE="$FABLO_IMAGE_NAME:$FABLO_VERSION"

COMMAND="$1"
Expand Down

0 comments on commit 8ebd31c

Please sign in to comment.