-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
…slagern Feature 1351 Config auslagern
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
root = true | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
root = true | ||
|
||
[{*.js,*.ts}] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
package-lock.json -diff | ||
* -text |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,132 @@ | ||
name: Publish Edge | ||
|
||
on: | ||
push: | ||
branches: | ||
- "develop" | ||
|
||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: | | ||
Version number (e.g. 1.2.3-dev1). | ||
Leave empty to determine the next version automatically. | ||
required: false | ||
default: "" | ||
is-edge: | ||
type: boolean | ||
description: "Tag the commit and published image with `edge`." | ||
default: true | ||
|
||
permissions: write-all | ||
|
||
env: | ||
IS_EDGE: ${{ github.event_name == 'push' || github.event.inputs.is-edge == 'true' }} | ||
|
||
jobs: | ||
determine_version: | ||
name: "determine version" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.find_version.outputs.result || github.event.inputs.version }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
if: ${{ github.event.inputs.version == '' }} | ||
- name: Get tags of edge commit | ||
id: get_edge_tags | ||
if: ${{ github.event.inputs.version == '' }} | ||
run: | | ||
git fetch --tags | ||
EDGE_COMMIT=$(git rev-list -n 1 edge) | ||
EDGE_TAGS=$(printf "%s," $(git tag --contains $EDGE_COMMIT)) | ||
EDGE_TAGS=${EDGE_TAGS%,} | ||
echo "edge_tags=$EDGE_TAGS" >> "$GITHUB_OUTPUT" | ||
- name: Find next version | ||
id: find_version | ||
if: ${{ github.event.inputs.version == '' }} | ||
uses: actions/github-script@v7 | ||
env: | ||
EDGE_TAGS: ${{ steps.get_edge_tags.outputs.edge_tags }} | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { findNextVersion } = require('./.github/scripts/find-version.js'); | ||
const tags = process.env.EDGE_TAGS.split(','); | ||
const targetBranch = context.payload.ref.replace('refs/heads/', ''); | ||
const pullRequests = await github.rest.pulls.list({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'closed', | ||
base: targetBranch, | ||
sort: 'updated', | ||
direction: 'desc' | ||
}); | ||
const mergedPullRequest = pullRequests.data.find(pr => pr.merge_commit_sha === context.payload.after); | ||
const sourceBranch = mergedPullRequest == null | ||
? targetBranch | ||
: mergedPullRequest.head.ref.replace('refs/heads/', '') | ||
const version = findNextVersion(tags, sourceBranch); | ||
return `${version.major}.${version.minor}.${version.patch}-dev${version.preRelease}`; | ||
build_and_push_api: | ||
name: "build and push api" | ||
needs: | ||
- determine_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create image | ||
uses: ./.github/actions/create-image | ||
with: | ||
IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-api | ||
TAG: ${{ env.IS_EDGE == 'true' && 'edge' || '' }} | ||
VERSION: ${{ needs.determine_version.outputs.version }} | ||
DOCKERFILE: ./api/Dockerfile | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONTEXT: ./api | ||
|
||
build_and_push_ui: | ||
name: "build and push ui" | ||
needs: | ||
- determine_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create image | ||
uses: ./.github/actions/create-image | ||
with: | ||
IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-ui | ||
TAG: ${{ env.IS_EDGE == 'true' && 'edge' || '' }} | ||
VERSION: ${{ needs.determine_version.outputs.version }} | ||
DOCKERFILE: ./ui/Dockerfile | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONTEXT: ./ui | ||
|
||
tag_commit: | ||
name: "tag commit" | ||
needs: | ||
- determine_version | ||
- build_and_push_api | ||
- build_and_push_ui | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: tag edge | ||
if: ${{ env.IS_EDGE == 'true' }} | ||
uses: ./.github/actions/tag-commit | ||
with: | ||
TAG_NAME: edge | ||
SHA: ${{ github.sha }} | ||
- name: tag version | ||
uses: ./.github/actions/tag-commit | ||
with: | ||
TAG_NAME: ${{ needs.determine_version.outputs.version }} | ||
SHA: ${{ github.sha }} | ||
name: Publish Edge | ||
|
||
on: | ||
push: | ||
branches: | ||
- "develop" | ||
|
||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: | | ||
Version number (e.g. 1.2.3-dev1). | ||
Leave empty to determine the next version automatically. | ||
required: false | ||
default: "" | ||
is-edge: | ||
type: boolean | ||
description: "Tag the commit and published image with `edge`." | ||
default: true | ||
|
||
permissions: write-all | ||
|
||
env: | ||
IS_EDGE: ${{ github.event_name == 'push' || github.event.inputs.is-edge == 'true' }} | ||
|
||
jobs: | ||
determine_version: | ||
name: "determine version" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.find_version.outputs.result || github.event.inputs.version }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
if: ${{ github.event.inputs.version == '' }} | ||
- name: Get tags of edge commit | ||
id: get_edge_tags | ||
if: ${{ github.event.inputs.version == '' }} | ||
run: | | ||
git fetch --tags | ||
EDGE_COMMIT=$(git rev-list -n 1 edge) | ||
EDGE_TAGS=$(printf "%s," $(git tag --contains $EDGE_COMMIT)) | ||
EDGE_TAGS=${EDGE_TAGS%,} | ||
echo "edge_tags=$EDGE_TAGS" >> "$GITHUB_OUTPUT" | ||
- name: Find next version | ||
id: find_version | ||
if: ${{ github.event.inputs.version == '' }} | ||
uses: actions/github-script@v7 | ||
env: | ||
EDGE_TAGS: ${{ steps.get_edge_tags.outputs.edge_tags }} | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { findNextVersion } = require('./.github/scripts/find-version.js'); | ||
const tags = process.env.EDGE_TAGS.split(','); | ||
const targetBranch = context.payload.ref.replace('refs/heads/', ''); | ||
const pullRequests = await github.rest.pulls.list({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'closed', | ||
base: targetBranch, | ||
sort: 'updated', | ||
direction: 'desc' | ||
}); | ||
const mergedPullRequest = pullRequests.data.find(pr => pr.merge_commit_sha === context.payload.after); | ||
const sourceBranch = mergedPullRequest == null | ||
? targetBranch | ||
: mergedPullRequest.head.ref.replace('refs/heads/', '') | ||
const version = findNextVersion(tags, sourceBranch); | ||
return `${version.major}.${version.minor}.${version.patch}-dev${version.preRelease}`; | ||
build_and_push_api: | ||
name: "build and push api" | ||
needs: | ||
- determine_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create image | ||
uses: ./.github/actions/create-image | ||
with: | ||
IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-api | ||
TAG: ${{ env.IS_EDGE == 'true' && 'edge' || '' }} | ||
VERSION: ${{ needs.determine_version.outputs.version }} | ||
DOCKERFILE: ./api/Dockerfile | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONTEXT: ./api | ||
|
||
build_and_push_ui: | ||
name: "build and push ui" | ||
needs: | ||
- determine_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create image | ||
uses: ./.github/actions/create-image | ||
with: | ||
IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-ui | ||
TAG: ${{ env.IS_EDGE == 'true' && 'edge' || '' }} | ||
VERSION: ${{ needs.determine_version.outputs.version }} | ||
DOCKERFILE: ./ui/Dockerfile | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONTEXT: ./ui | ||
|
||
tag_commit: | ||
name: "tag commit" | ||
needs: | ||
- determine_version | ||
- build_and_push_api | ||
- build_and_push_ui | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: tag edge | ||
if: ${{ env.IS_EDGE == 'true' }} | ||
uses: ./.github/actions/tag-commit | ||
with: | ||
TAG_NAME: edge | ||
SHA: ${{ github.sha }} | ||
- name: tag version | ||
uses: ./.github/actions/tag-commit | ||
with: | ||
TAG_NAME: ${{ needs.determine_version.outputs.version }} | ||
SHA: ${{ github.sha }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ | |
|
||
### Changed | ||
|
||
- Config is loaded from the frontend at runtime now. | ||
|
||
### Fixed |