Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed Feb 2, 2024
2 parents 6c4118d + edf9fa1 commit 56a3377
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 33 deletions.
49 changes: 17 additions & 32 deletions .github/workflows/build-node-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,22 @@ on:
- 'v*'

jobs:
trigger-build:
build_cfg:
runs-on: ubuntu-latest
environment: default
env:
VERSION_STR: ${{ github.ref_name }}
outputs:
VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }}
steps:
- name: "Trigger Node Build"
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.CI_WEBHOOK_TOKEN }}
repository: istresearch/ci-docker
event-type: build-node-app
client-payload: |-
{
"repo": {
"name": "${{ github.repository }}",
"ref_type": "${{ github.ref_type }}",
"ref_name": "${{ github.ref_name }}"
},
"node": {
"version": "12.x",
"arch_allowed": "amd64 arm64",
"install_sh": "ci_yarn_install.sh",
"output_folder": "build"
},
"filerepo": {
"file_name": "floweditor-${{ github.ref_name }}",
"dst_folder": "/data/repo/engage/floweditor"
},
"callback": {
"repository": "${{ github.repository }}",
"event_type": "build_node_success",
"error_type": "build_node_error"
}
}
#endjob trigger-build
- name: "Get Version STR"
id: config_step
run: |-
echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT
build_node_app:
needs: [build_cfg]
name: "Build node tarball with tag [${{ needs.build_cfg.outputs.VERSION_STR }}]"
uses: ./.github/workflows/util-build-node-app.yml
secrets: inherit
with:
version_str: ${{ needs.build_cfg.outputs.VERSION_STR }}
42 changes: 42 additions & 0 deletions .github/workflows/tag-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Tag Commit & Build"

on:
push:
branches-ignore:
- develop
- main
- master

jobs:
build_cfg:
runs-on: ubuntu-latest
outputs:
VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }}
permissions: write-all
steps:
- name: "Create Version"
id: config_step
run: |-
VER_BUILD=$(date +%-H%M)
VERSION_STR="v$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}"
echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT
echo "::notice::Version STR=${VERSION_STR}"
- name: "Create Tag"
uses: actions/github-script@v7
with:
script: |-
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.config_step.outputs.VERSION_STR }}',
sha: context.sha
})
build_node_app:
needs: [build_cfg]
name: "Build node tarball with tag [${{ needs.build_cfg.outputs.VERSION_STR }}]"
uses: ./.github/workflows/util-build-node-app.yml
secrets: inherit
with:
version_str: ${{ needs.build_cfg.outputs.VERSION_STR }}
30 changes: 30 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Tag Release"

on:
push:
branches:
- main
- master

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: "Create Version"
id: version_cfg
run: |-
VER_BUILD=$(date +%-H%M)
VERSION_NUM="v$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}"
echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT
- name: "Tag release"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version_cfg.outputs.VERSION_NUM }}
release_name: ${{ steps.version_cfg.outputs.VERSION_NUM }}
draft: false
prerelease: false
45 changes: 45 additions & 0 deletions .github/workflows/util-build-node-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Utility - Build Node App"
# DESC: its own callable workflow so diff conditions can use same code.
on:
workflow_call:
inputs:
version_str:
description: 'floweditor tag to use'
required: true
type: string

jobs:
trigger-build:
runs-on: ubuntu-latest
environment: default
steps:
- name: "Trigger Node Build"
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CI_WEBHOOK_TOKEN }}
repository: istresearch/ci-docker
event-type: build-node-app
client-payload: |-
{
"repo": {
"name": "${{ github.repository }}",
"ref_type": "${{ github.ref_type }}",
"ref_name": "${{ github.ref_name }}"
},
"node": {
"version": "12.x",
"arch_allowed": "amd64 arm64",
"install_sh": "ci_yarn_install.sh",
"output_folder": "build"
},
"filerepo": {
"file_name": "floweditor-${{ inputs.version_str }}",
"dst_folder": "/data/repo/engage/floweditor"
},
"callback": {
"repository": "${{ github.repository }}",
"event_type": "build_node_success",
"error_type": "build_node_error"
}
}
#endjob trigger-build
3 changes: 2 additions & 1 deletion src/config/typeConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ export const typeConfigList: Type[] = [
localizeableKeys: ['exits'],
component: OpenTicketComp,
aliases: [Types.split_by_ticket],
visibility: VISIBILITY_ONLINE,
//visibility: VISIBILITY_ONLINE,
visibility: VISIBILITY_HIDDEN,
filter: FeatureFilter.HAS_TICKETER
},
{
Expand Down

0 comments on commit 56a3377

Please sign in to comment.