Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/actions/configure-dockerhub/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: configure-dockerhub
description: Login to dockerhub
runs:
using: composite
steps:
- name: Configure Docker Hub
run: |-
[ -z "$DOCKERHUB_USERNAME" ] && exit 0
[ -z "$DOCKERHUB_TOKEN" ] && exit 0
echo "${DOCKERHUB_TOKEN}" | docker login --username $DOCKERHUB_USERNAME --password-stdin
shell: bash
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build, Push, and Release
on:
push:
tags:
- "*"
jobs:
build-push-docker:
name: ${{ matrix.arch }} - docker build
runs-on: ${{ fromJSON('{"arm64":"buildjet-2vcpu-ubuntu-2204-arm","amd64":"ubuntu-22.04"}')[matrix.arch] }}
permissions:
id-token: write # Required for OIDC authentication
contents: read # This is required for actions/checkout@v4
strategy:
matrix:
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0 # include tags for VERSION detection
- name: Configure DockerHub
uses: ./.github/actions/configure-dockerhub
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
- name: Set up Go 1.24
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Publish Docker
run: make publish VERSION=$GITHUB_REF_NAME TAG_SUFFIX=-${{ matrix.arch }}
push-docker-manifests:
runs-on: ubuntu-22.04
needs:
- build-push-docker
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure DockerHub
uses: ./.github/actions/configure-dockerhub
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish
run: make publish-docker-manifests VERSION=$GITHUB_REF_NAME
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ COPY --from=build /src/app /opt/app

# Entrypoint: run the app using tini for proper signal handling
ENTRYPOINT ["tini", "--", "/opt/app"]
CMD ["start"]
101 changes: 64 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,58 @@ plugin-darwin: ${SUBSTRATE_PLUGIN_DARWIN}

all: tests-api
.PHONY: tests-api
tests-api:
cd tests && $(MAKE)
tests-api: make-C/tests/default
@
.PHONY: tests-api-clean
tests-api-clean:
cd tests && $(MAKE) clean
tests-api-clean: make-C/tests/clean
@

all: api
.PHONY: api
api:
cd api && $(MAKE)
api: make-C/api/default
@

all: phylum
.PHONY: phylum
phylum:
cd phylum && $(MAKE)
phylum: make-C/phylum/default
@
test: phylumtest
.PHONY: phylumtest
phylumtest:
cd phylum && $(MAKE) test
phylumtest: make-C/phylum/test
@
clean: phylumclean
.PHONY: phylumclean
phylumclean:
cd phylum && $(MAKE) clean
phylumclean: make-C/phylum/clean
@

all: portal
.PHONY: portal
portal: plugin
cd ${SERVICE_DIR} && $(MAKE)
portal: plugin make-C/portal/default
@

clean: portalclean
.PHONY: portalclean
portalclean:
cd ${SERVICE_DIR} && $(MAKE) clean
portalclean: make-C/portal/clean
@

docker-push: portal-push
.PHONY: portal-push
portal-push: make-C/portal/push
@

docker-push-manifests: portal-push-manifests
.PHONY: portal-push-manifests
portal-push-manifests: make-C/portal/push-manifests
@

.PHONY: fabric
all: fabric
fabric:
cd fabric && $(MAKE)
fabric: make-C/fabric/default
@
.PHONY: fabricclean
clean: fabricclean
fabricclean:
cd fabric && $(MAKE) clean

fabricclean: make-C/fabric/clean
@
.PHONY: storage-up
storage-up:
cd fabric && $(MAKE) up install init
Expand Down Expand Up @@ -146,12 +156,12 @@ integrationcitest:
$(MAKE) down

.PHONY: integration
integration:
cd tests && $(MAKE) test-docker
integration: make-C/tests/test-docker
@

.PHONY: repl
repl:
cd phylum && $(MAKE) repl
repl: make-C/phylum/repl
@

# this target is called by git-hooks/pre-push. It's separated into its own target
# to allow us to update the git-hooks without having to reinstall the hook
Expand All @@ -163,6 +173,7 @@ pre-push:

.PHONY:
download: plugin
@

${STATIC_PLUGINS_DUMMY}:
${MKDIR_P} $(dir $@)
Expand All @@ -174,30 +185,30 @@ ${SUBSTRATE_PLUGIN}: ${STATIC_PLUGINS_DUMMY}

.PHONY: explorer
explorer: explorer-up-clean
@

.PHONY: explorer-up
explorer-up:
cd ${PROJECT_REL_DIR}/explorer && make up
explorer-up: make-C/explorer/up
@

.PHONY: explorer-up-clean
explorer-up-clean:
cd ${PROJECT_REL_DIR}/explorer && make up-clean
explorer-up-clean: make-C/explorer/up-clean
@

.PHONY: explorer-down
explorer-down:
cd ${PROJECT_REL_DIR}/explorer && make down
explorer-down: make-C/explorer/down
@

.PHONY: explorer-clean
explorer-clean:
cd ${PROJECT_REL_DIR}/explorer && make down-clean
explorer-clean: make-C/explorer/down-clean
@

.PHONY: explorer-watch
explorer-watch:
cd ${PROJECT_REL_DIR}/explorer && make watch
explorer-watch: make-C/explorer/watch
@

.PHONY: observability-up observability-down


.PHONY: observability-network observability-up observability-down

observability-network:
Expand All @@ -214,6 +225,22 @@ init-docs:
git submodule update --init --recursive --remote docs

.PHONY: setup

setup: init-docs download
@echo "Running project setup..."

.PHONY: publish-docker
publish-docker: docker-push
@

.PHONY: publish-docker-manifests
publish-docker-manifests: docker-push-manifests
@

.PHONY: publish
publish: publish-docker
@

.PHONY:
docker-push: all
@

Loading