This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d342a56
commit 206e4c7
Showing
21 changed files
with
1,168 additions
and
1,795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,105 +29,17 @@ jobs: | |
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_OUTPUT | ||
echo "ORG_NAME=$ORG_NAME" >> $GITHUB_OUTPUT | ||
helm-lint: | ||
runs-on: ubuntu-latest | ||
needs: [preconditions] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.8.0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Run chart-testing (lint) | ||
run: ct lint --validate-maintainers false --charts helm/${{ needs.preconditions.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/ | ||
|
||
helm-test: | ||
runs-on: ubuntu-latest | ||
needs: [preconditions] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
- name: Setup Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
buildkitd-flags: '--debug' | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.8.0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Setup Minikube | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: 'v1.17.1' | ||
kubernetes version: 'v1.19.2' | ||
- name: Login to minikube docker registry | ||
run: eval $(minikube -p minikube docker-env) | ||
- name: Build Multi-arch | ||
uses: docker/build-push-action@v3 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
load: false | ||
file: ./Dockerfile | ||
platforms: linux/amd64, linux/arm64 | ||
tags: | | ||
${{ needs.preconditions.outputs.repo_name }}:latest | ||
labels: | | ||
org.opencontainers.image.title=${{ needs.preconditions.outputs.repo_name }} | ||
org.opencontainers.image.description=${{ github.event.repository.description }} | ||
org.opencontainers.image.source=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.url=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Load and push image for testing | ||
uses: docker/build-push-action@v3 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
tags: | | ||
${{ needs.preconditions.outputs.repo_name }}:latest | ||
labels: | | ||
org.opencontainers.image.title=${{ needs.preconditions.outputs.repo_name }} | ||
org.opencontainers.image.description=${{ github.event.repository.description }} | ||
org.opencontainers.image.source=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.url=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Run chart-testing (install) | ||
run: ct install --charts helm/${{ needs.preconditions.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/ | ||
|
||
lint: | ||
name: Run lint | ||
runs-on: ubuntu-latest | ||
needs: [preconditions] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
run: npm install -g npm@8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@latest | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -150,11 +62,11 @@ jobs: | |
needs: [preconditions] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
run: npm install -g npm@8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@latest | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -181,11 +93,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
run: npm install -g npm@8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@latest | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -227,8 +139,6 @@ jobs: | |
name: 'Publish package' | ||
needs: | ||
- preconditions | ||
- helm-lint | ||
- helm-test | ||
- lint | ||
- dependency-check | ||
- tests | ||
|
@@ -261,7 +171,7 @@ jobs: | |
username: ${{ secrets.DSCP_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DSCP_DOCKERHUB_TOKEN }} | ||
- name: Publish multi-arch image | ||
uses: docker/build-push-action@v3 | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
builder: ${{ steps.buildx.outputs.name }} | ||
|
@@ -282,14 +192,6 @@ jobs: | |
org.opencontainers.image.version=${{ needs.check-version.outputs.version }} | ||
org.opencontainers.image.created=${{ needs.check-version.outputs.build_date }} | ||
# Publish helm charts | ||
- name: Publish Helm charts | ||
uses: stefanprodan/helm-gh-pages@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
charts_dir: helm | ||
helm_version: 3.8.0 | ||
|
||
# Build github release | ||
- name: Build release version | ||
uses: softprops/action-gh-release@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,104 +23,16 @@ jobs: | |
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_OUTPUT | ||
echo "ORG_NAME=$ORG_NAME" >> $GITHUB_OUTPUT | ||
helm-lint: | ||
runs-on: ubuntu-latest | ||
needs: [repo_ids] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.8.0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Run chart-testing (lint) | ||
run: ct lint --validate-maintainers false --charts helm/${{ needs.repo_ids.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/ | ||
|
||
helm-test: | ||
runs-on: ubuntu-latest | ||
needs: [repo_ids] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
- name: Setup Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
buildkitd-flags: '--debug' | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.8.0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Setup Minikube | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: 'v1.17.1' | ||
kubernetes version: 'v1.19.2' | ||
- name: Login to minikube docker registry | ||
run: eval $(minikube -p minikube docker-env) | ||
- name: Build Multi-arch | ||
uses: docker/build-push-action@v3 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
load: false | ||
file: ./Dockerfile | ||
platforms: linux/amd64, linux/arm64 | ||
tags: | | ||
${{ needs.repo_ids.outputs.repo_name }}:latest | ||
labels: | | ||
org.opencontainers.image.title=${{ needs.repo_ids.outputs.repo_name }} | ||
org.opencontainers.image.description=${{ github.event.repository.description }} | ||
org.opencontainers.image.source=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.url=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Load and push image for testing | ||
uses: docker/build-push-action@v3 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
tags: | | ||
${{ needs.repo_ids.outputs.repo_name }}:latest | ||
labels: | | ||
org.opencontainers.image.title=${{ needs.repo_ids.outputs.repo_name }} | ||
org.opencontainers.image.description=${{ github.event.repository.description }} | ||
org.opencontainers.image.source=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.url=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Run chart-testing (install) | ||
run: ct install --charts helm/${{ needs.repo_ids.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/ | ||
|
||
lint: | ||
name: Run lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
run: npm install -g npm@8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@latest | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -142,11 +54,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
run: npm install -g npm@8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@latest | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -173,11 +85,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
run: npm install -g npm@8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@latest | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.