File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 3535 REPO_OWNER : " Local-Connectivity-Lab"
3636 REPO_NAME : " ccn-coverage-docker"
3737 TARGET_ARTIFACT_NAME : " ccn-coverage-vis"
38- run : npx semantic-release
38+ run : npx semantic-release
39+
40+ - name : Get version
41+ id : get_version
42+ run : |
43+ VERSION=$(node -p "require('./package.json').version")
44+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
45+ echo "Released version: $VERSION"
46+
47+ - name : Login to Docker Registry
48+ uses : docker/login-action@v3
49+ with :
50+ registry : icr.infra.seattlecommunitynetwork.org
51+ username : ${{ secrets.REGISTRY_USERNAME }}
52+ password : ${{ secrets.REGISTRY_PASSWORD }}
53+
54+ - name : Build and publish Docker image
55+ run : |
56+ make publish VERSION=${{ steps.get_version.outputs.VERSION }}
Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ build-%: validate-semver-%
3737 @echo " Create docker container for $( VIS_DOCKER_IMAGE_NAME) with version $* "
3838 docker build -t $(VIS_DOCKER_IMAGE_NAME ) :$* -f vis.dockerfile .
3939
40+ # Publish to Docker registry (e.g., make publish VERSION=1.2.3)
41+ .PHONY : publish
42+ publish : validate-semver-$(VERSION )
43+ @echo " Building and publishing $( VIS_DOCKER_IMAGE_NAME) :$( VERSION) "
44+ docker build -t $(VIS_DOCKER_IMAGE_NAME ) :$(VERSION ) -f vis.dockerfile .
45+ docker tag $(VIS_DOCKER_IMAGE_NAME ) :$(VERSION ) icr.infra.seattlecommunitynetwork.org/$(VIS_DOCKER_IMAGE_NAME ) :$(VERSION )
46+ docker tag $(VIS_DOCKER_IMAGE_NAME ) :$(VERSION ) icr.infra.seattlecommunitynetwork.org/$(VIS_DOCKER_IMAGE_NAME ) :latest
47+ docker push icr.infra.seattlecommunitynetwork.org/$(VIS_DOCKER_IMAGE_NAME ) :$(VERSION )
48+ docker push icr.infra.seattlecommunitynetwork.org/$(VIS_DOCKER_IMAGE_NAME ) :latest
49+ @echo " Successfully published $( VIS_DOCKER_IMAGE_NAME) :$( VERSION) to registry"
4050
4151# The target for development
4252.PHONY : dev
4555 -v $(CURRENT_DIR ) :/app \
4656 -w /app \
4757 -p $(EXPOSED_PORT ) :$(EXPOSED_PORT ) \
58+ --network ccn-coverage-api_coverage-app-network \
4859 $(DOCKER_IMAGE ) /bin/bash
You can’t perform that action at this time.
0 commit comments