-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added workflows, updated gitignore
- Loading branch information
1 parent
920b6b2
commit 68e73d1
Showing
8 changed files
with
389 additions
and
49 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build on every push | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
|
||
jobs: | ||
build: | ||
name: "Build" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Calculate release version | ||
run: | | ||
echo "release_version=1.$(date +'%g%m%d%H%M').$(echo ${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV | ||
- name: Set version | ||
run: | | ||
git tag v${{ env.release_version }} | ||
git push --tags | ||
- name: Setup bun 🏗 | ||
uses: oven-sh/setup-bun@v1 | ||
# with: | ||
# version: "canary" | ||
- name: Install dependencies 👨🏻💻 | ||
run: bun install | ||
- name: Build | ||
run: bun build |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
name: Validate PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: walt-id/commitlint-github-action@v4 | ||
with: | ||
noMerges: true | ||
id: lint_commit_messages | ||
continue-on-error: true | ||
- name: semantic-pull-request | ||
if: always() && !contains(fromJSON(steps.lint_commit_messages.outputs.results).*.valid, true) | ||
id: lint_pr_title | ||
uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
# When the previous steps fails, the workflow would stop. By adding this | ||
# condition you can continue the execution with the populated error message. | ||
if: always() && (steps.lint_pr_title.outputs.error_message != null || contains(fromJSON(steps.lint_commit_messages.outputs.results).*.valid, false)) | ||
with: | ||
header: pr-title-lint-error | ||
message: | | ||
Hey there and thank you for opening this pull request! 👋🏼 | ||
Some or all of your commit messages do not seem to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). | ||
To allow the merge of this pull request, we require that at least one commit message <b>or</b> the PR title follow that convention. | ||
You have the <b>following possibilities to proceed</b> with this PR: | ||
1) Make sure at least one commit message complies with the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). | ||
Note, if not all messages comply, the merge will be allowed, but you will still see this warning. | ||
2) Update the title of this pull request to comply with the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). | ||
<b>Further information:</b> | ||
The commit messages and PR title will be parsed according to the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/), to automatically populate the release notes for the next official release. | ||
Therefore, make sure the commit messages <b>or</b> PR title contain the necessary and relevant information describing the changes of this pull request. | ||
<b>Commit message details:</b> | ||
``` | ||
${{ toJSON(fromJSON(steps.lint_commit_messages.outputs.results)) }} | ||
``` | ||
<b>PR title details:</b> | ||
``` | ||
${{ steps.lint_pr_title.outputs.error_message }} | ||
``` | ||
# Delete a previous comment when the issue has been resolved | ||
- if: ${{ steps.lint_pr_title.outputs.error_message == null && !contains(fromJSON(steps.lint_commit_messages.outputs.results).*.valid, false) }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: pr-title-lint-error | ||
delete: true |
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Release on push to main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: "Release" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# versioning | ||
- name: Calculate release version | ||
run: | | ||
echo "release_version=1.$(date +'%g%m%d%H%M').0" >> $GITHUB_ENV | ||
- name: Set version | ||
run: | | ||
git tag v${{ env.release_version }} | ||
git push --tags | ||
# bun setup and build | ||
- name: Setup bun 🏗 | ||
uses: oven-sh/setup-bun@v1 | ||
# with: | ||
# version: "canary" | ||
- name: Install dependencies 👨🏻💻 | ||
run: bun install | ||
- name: Build | ||
run: bun build | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
# docker build and push | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{secrets.DOCKER_USERNAME}} | ||
password: ${{secrets.DOCKER_PASSWORD}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: waltid/portal:latest, waltid/portal:${{ env.release_version }} | ||
# changelog | ||
- name: Changelog | ||
uses: ardalanamini/auto-changelog@v3 | ||
id: changelog | ||
with: | ||
github-token: ${{ github.token }} | ||
commit-types: | | ||
breaking: Breaking Changes | ||
feat: New Features | ||
fix: Bug Fixes | ||
revert: Reverts | ||
perf: Performance Improvements | ||
refactor: Refactors | ||
deps: Dependencies | ||
docs: Documentation Changes | ||
style: Code Style Changes | ||
build: Build System | ||
ci: Continuous Integration | ||
test: Tests | ||
chore: Chores | ||
other: Other Changes | ||
default-commit-type: Other Changes | ||
release-name: v${{ env.release_version }} | ||
mention-authors: true | ||
mention-new-contributors: true | ||
include-compare: true | ||
semver: true | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ env.release_version }} | ||
body: | | ||
${{ steps.changelog.outputs.changelog }} | ||
prerelease: ${{ steps.changelog.outputs.prerelease }} | ||
- name: Prepare CD | ||
run: sed "s/_DEFAULT_DEPLOYMENT_/$GITHUB_SHA/g" k8s/deployment-dev.yaml > k8s/deployment_mod.yaml | ||
- name: Continuous deployment | ||
uses: actions-hub/kubectl@master | ||
env: | ||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | ||
with: | ||
args: apply -n portals -f k8s/deployment_mod.yaml |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '30 20 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v3 | ||
with: | ||
stale-issue-message: 'This issue has been marked as stale.' | ||
stale-pr-message: 'This pull request has been marked as stale.' |
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 |
---|---|---|
@@ -1,10 +1,156 @@ | ||
node_modules | ||
*.log* | ||
.nuxt | ||
.nitro | ||
.cache | ||
.output | ||
.data | ||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
.idea | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
### Node Patch ### | ||
# Serverless Webpack directories | ||
.webpack/ | ||
|
||
# Optional stylelint cache | ||
|
||
# SvelteKit build / generate output | ||
.svelte-kit | ||
|
||
.nitro/ | ||
.data/ | ||
.idea/ | ||
|
||
*-lock.json | ||
*.lock | ||
*.lockb | ||
.npmrc | ||
.prettierrc | ||
.eslintrc |
Oops, something went wrong.