-
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.
* Update deps * Bump version * Switch ipfs test commands to ipv4 localhost * Update tests and remove node-fetch * Add renovate * Update docker workflow so we test it builds * Add back in packages for arm64
- Loading branch information
1 parent
c3d5a3a
commit 0b7612c
Showing
21 changed files
with
927 additions
and
1,637 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,101 +29,13 @@ 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/ | ||
|
||
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/ | ||
|
||
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 | ||
|
@@ -148,9 +60,9 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
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: | ||
|
@@ -171,9 +83,9 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
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: | ||
|
@@ -220,8 +132,6 @@ jobs: | |
name: 'Publish package' | ||
needs: | ||
- preconditions | ||
- helm-lint | ||
- helm-test | ||
- lint | ||
- dependency-check | ||
- tests | ||
|
@@ -254,7 +164,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 }} | ||
|
@@ -275,14 +185,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/ | ||
|
||
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/ | ||
|
||
lint: | ||
name: Run lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
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: | ||
|
@@ -140,9 +52,9 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
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: | ||
|
@@ -163,8 +75,8 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: 16.x | ||
- name: Use npm v8 | ||
node-version: 18.x | ||
- name: Use npm latest | ||
run: npm install -g npm@8 | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
|
@@ -202,3 +114,34 @@ jobs: | |
shell: bash | ||
run: | | ||
exit $([[ "${{steps.get_version.outputs.IS_NEW_VERSION}}" = "true" ]] && echo 0 || echo 1) | ||
docker-build: | ||
name: 'Build docker image' | ||
needs: | ||
- lint | ||
- tests | ||
- check-version | ||
- dependency-check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Docker build | ||
- 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: Publish multi-arch image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: false | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64, linux/arm64 |
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.