diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 686e5c43bb..e145e33545 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,35 +15,35 @@ jobs: - name: Build run: | pushd interfaces - npm install + npm install --force npm run build popd pushd logger-helper - npm install + npm install --force npm run build popd pushd logger-service - npm install + npm install --force npm run build popd pushd frontend - npm install + npm install --force npm run build popd pushd auth-service - npm install + npm install --force npm run build popd pushd guardian-service - npm install + npm install --force npm run build popd pushd message-broker - npm install + npm install --force npm run build popd pushd api-gateway - npm install + npm install --force npm run build popd env: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..333cfdd00f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,101 @@ +name: Publish Images +on: + release: + types: [published] + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: get-npm-version + + id: package-version + uses: martinbeentjes/npm-get-version-action@main + with: + path: guardian-service + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v0' + with: + workload_identity_provider: 'projects/101730247931/locations/global/workloadIdentityPools/hedera-registry-pool/providers/hedera-registry-gh-actions' + service_account: 'guardian-publisher@hedera-registry.iam.gserviceaccount.com' + token_format: 'access_token' + + - uses: 'docker/login-action@v1' + with: + registry: 'gcr.io' # or REGION-docker.pkg.dev + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + + - name: logger-service + uses: docker/build-push-action@v2 + with: + context: . + file: ./logger-service/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/logger-service:${{ steps.package-version.outputs.current-version}}' + + - name: auth-service + uses: docker/build-push-action@v2 + with: + context: . + file: ./auth-service/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/auth-service:${{ steps.package-version.outputs.current-version}}' + + - name: api-gateway + uses: docker/build-push-action@v2 + with: + context: . + file: ./api-gateway/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/api-gateway:${{ steps.package-version.outputs.current-version}}' + + - name: guardian-service + uses: docker/build-push-action@v2 + with: + context: . + file: ./guardian-service/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/guardian-service:${{ steps.package-version.outputs.current-version}}' + + - name: ipfs-client + uses: docker/build-push-action@v2 + with: + context: . + file: ./ipfs-client/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/ipfs-client:${{ steps.package-version.outputs.current-version}}' + + - name: topic-viewer + uses: docker/build-push-action@v2 + with: + context: . + file: ./topic-viewer/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/topic-viewer:${{ steps.package-version.outputs.current-version}}' + + - name: api-docs + uses: docker/build-push-action@v2 + with: + context: . + file: ./api-docs/Dockerfile + push: true + tags: 'gcr.io/hedera-registry/api-docs:${{ steps.package-version.outputs.current-version}}' + + - name: web-proxy + uses: docker/build-push-action@v2 + with: + context: . + file: ./web-proxy/Dockerfile.ci + push: true + tags: 'gcr.io/hedera-registry/frontend:${{ steps.package-version.outputs.current-version}}' diff --git a/api-docs/package.json b/api-docs/package.json index 2afd09ba45..0d3093dd6b 100644 --- a/api-docs/package.json +++ b/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "api-docs", - "version": "2.0.0", + "version": "2.0.1", "description": "Swagger Documentation", "main": "dist/index.js", "scripts": { diff --git a/api-gateway/package.json b/api-gateway/package.json index 4e950aef3e..7c0d722a55 100644 --- a/api-gateway/package.json +++ b/api-gateway/package.json @@ -48,5 +48,5 @@ "start": "node dist/index.js", "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/auth-service/Dockerfile b/auth-service/Dockerfile index 7e04142df2..280a46a3f1 100644 --- a/auth-service/Dockerfile +++ b/auth-service/Dockerfile @@ -20,7 +20,7 @@ WORKDIR /usr/auth-service COPY ./auth-service/package*.json ./ COPY ./auth-service/tsconfig.json ./ COPY ./auth-service/.env.docker ./.env -RUN npm install +RUN npm install --force ADD ./auth-service/src ./src/. RUN npm run build diff --git a/auth-service/package.json b/auth-service/package.json index 264880662f..6598826c62 100644 --- a/auth-service/package.json +++ b/auth-service/package.json @@ -43,5 +43,5 @@ "start": "node dist/index.js", "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/frontend/package.json b/frontend/package.json index 682f9484f1..eaf9304742 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -59,5 +59,5 @@ "test": "ng test", "watch": "ng build --watch --configuration development --output-path ../www-data" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/guardian-service/Dockerfile b/guardian-service/Dockerfile index e0ece27b69..3443aa3685 100644 --- a/guardian-service/Dockerfile +++ b/guardian-service/Dockerfile @@ -21,7 +21,7 @@ COPY ./guardian-service/package*.json ./ COPY ./guardian-service/tsconfig.json ./ COPY ./guardian-service/.env.docker ./.env COPY ./guardian-service/system-schemes ./system-schemes/. -RUN npm install +RUN npm install --force ADD ./guardian-service/src ./src/. RUN npm run build diff --git a/guardian-service/package.json b/guardian-service/package.json index 141b6f80f2..b897073b3f 100644 --- a/guardian-service/package.json +++ b/guardian-service/package.json @@ -69,5 +69,5 @@ "test:network": "mocha tests/network-tests/**/*.test.js", "test:stability": "mocha tests/stability.test.js" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/interfaces/package.json b/interfaces/package.json index ab1357bc1d..2641882bea 100644 --- a/interfaces/package.json +++ b/interfaces/package.json @@ -23,5 +23,5 @@ "lint": "tslint --project .", "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/ipfs-client/Dockerfile b/ipfs-client/Dockerfile index 6c7a0a2101..f48a8b0f07 100644 --- a/ipfs-client/Dockerfile +++ b/ipfs-client/Dockerfile @@ -20,7 +20,7 @@ WORKDIR /usr/ipfs-client COPY ./ipfs-client/package*.json ./ COPY ./ipfs-client/tsconfig.json ./ COPY ./ipfs-client/.env.docker ./.env -RUN npm install +RUN npm install --force ADD ./ipfs-client/src ./src/. RUN npm run build diff --git a/ipfs-client/package.json b/ipfs-client/package.json index ed7ad37e85..8ace6791a2 100644 --- a/ipfs-client/package.json +++ b/ipfs-client/package.json @@ -46,5 +46,5 @@ "start": "node dist/index.js", "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ipfs-client.xml" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/logger-helper/package.json b/logger-helper/package.json index 3a650ee677..f46bb2516b 100644 --- a/logger-helper/package.json +++ b/logger-helper/package.json @@ -24,5 +24,5 @@ "lint": "tslint --project .", "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/logger-service/Dockerfile b/logger-service/Dockerfile index 13d03eba7c..1e6762cca6 100644 --- a/logger-service/Dockerfile +++ b/logger-service/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /usr/logger-service COPY ./logger-service/package*.json ./ COPY ./logger-service/tsconfig.json ./ COPY ./logger-service/.env.docker ./.env -RUN npm install +RUN npm install --force ADD ./logger-service/src ./src/. RUN npm run build diff --git a/logger-service/package.json b/logger-service/package.json index 5ed7ac835a..a7e2a713fa 100644 --- a/logger-service/package.json +++ b/logger-service/package.json @@ -38,5 +38,5 @@ "lint": "tslint --project .", "start": "node dist/index.js" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/message-broker/package.json b/message-broker/package.json index d7bb9453d7..ad06d5333c 100644 --- a/message-broker/package.json +++ b/message-broker/package.json @@ -21,5 +21,5 @@ "nodemon": "^2.0.7", "typescript": "^4.5.5" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/mrv-sender/package.json b/mrv-sender/package.json index 0758399d9a..b6861b28ec 100644 --- a/mrv-sender/package.json +++ b/mrv-sender/package.json @@ -27,5 +27,5 @@ "dev": "tsc -w", "start": "node dist/index.js" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/topic-viewer/package.json b/topic-viewer/package.json index ac3d4ac603..abdc1202a3 100644 --- a/topic-viewer/package.json +++ b/topic-viewer/package.json @@ -18,5 +18,5 @@ "dev": "tsc -w", "start": "node dist/index.js" }, - "version": "2.0.0" + "version": "2.0.1" }