From e023f46c131ee1644cedd08176a60bd201c88f09 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 10:56:06 -0800 Subject: [PATCH 01/15] PE-207: remove open_ticket from list of enum types. --- .github/workflows/build-node-app.yml | 2 +- .github/workflows/tag-release.yml | 31 ++++++++++++++++++++++++++++ src/config/interfaces.ts | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/tag-release.yml diff --git a/.github/workflows/build-node-app.yml b/.github/workflows/build-node-app.yml index eddecfb6..53ba5ea0 100644 --- a/.github/workflows/build-node-app.yml +++ b/.github/workflows/build-node-app.yml @@ -11,7 +11,7 @@ jobs: environment: default steps: - name: "Trigger Node Build" - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@latest with: token: ${{ secrets.CI_WEBHOOK_TOKEN }} repository: istresearch/ci-docker diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml new file mode 100644 index 00000000..ad3175e6 --- /dev/null +++ b/.github/workflows/tag-release.yml @@ -0,0 +1,31 @@ +name: tag release + +on: + push: + branches: + - main + - master + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@latest + + - name: "Create Version" + id: version_cfg + run: |- + VER_BUILD=$(date +%-H%M) + #VERSION_NUM="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" + VERSION_NUM="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" + echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT + + - name: "Tag release" + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ steps.version_cfg.outputs.VERSION_NUM }} + release_name: v${{ steps.version_cfg.outputs.VERSION_NUM }} + draft: false + prerelease: false diff --git a/src/config/interfaces.ts b/src/config/interfaces.ts index c33923cf..14651c23 100644 --- a/src/config/interfaces.ts +++ b/src/config/interfaces.ts @@ -28,7 +28,7 @@ export enum Types { call_classifier = 'call_classifier', call_resthook = 'call_resthook', call_webhook = 'call_webhook', - open_ticket = 'open_ticket', + //open_ticket = 'open_ticket', PE-207: hide ticket feature send_msg = 'send_msg', send_email = 'send_email', send_broadcast = 'send_broadcast', From 3accf16e56af0f4ee3b00ec6d2ff15e2db525359 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 11:14:45 -0800 Subject: [PATCH 02/15] gha: tweaks/fixes. --- .github/workflows/build-node-app.yml | 2 +- .github/workflows/tag-release.yml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-node-app.yml b/.github/workflows/build-node-app.yml index 53ba5ea0..d73c5872 100644 --- a/.github/workflows/build-node-app.yml +++ b/.github/workflows/build-node-app.yml @@ -11,7 +11,7 @@ jobs: environment: default steps: - name: "Trigger Node Build" - uses: peter-evans/repository-dispatch@latest + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.CI_WEBHOOK_TOKEN }} repository: istresearch/ci-docker diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index ad3175e6..b592aed7 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -10,18 +10,17 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@latest + - uses: actions/checkout@v3 - name: "Create Version" id: version_cfg run: |- VER_BUILD=$(date +%-H%M) - #VERSION_NUM="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" VERSION_NUM="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT - name: "Tag release" - uses: actions/create-release@latest + uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 635a5661352f9513c176a4b5e45727be5eb94637 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 11:16:21 -0800 Subject: [PATCH 03/15] gha: use correct dispatch version. --- .github/workflows/build-node-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-node-app.yml b/.github/workflows/build-node-app.yml index d73c5872..11599377 100644 --- a/.github/workflows/build-node-app.yml +++ b/.github/workflows/build-node-app.yml @@ -11,7 +11,7 @@ jobs: environment: default steps: - name: "Trigger Node Build" - uses: peter-evans/repository-dispatch@v4 + uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.CI_WEBHOOK_TOKEN }} repository: istresearch/ci-docker From 941335d1a9471c55811d40a245205637a59b1678 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 11:29:21 -0800 Subject: [PATCH 04/15] PE-207: filter visible actions rather than comment out type. --- src/components/flow/node/helpers.ts | 4 +++- src/config/interfaces.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/flow/node/helpers.ts b/src/components/flow/node/helpers.ts index b465fc36..aed45c38 100644 --- a/src/components/flow/node/helpers.ts +++ b/src/components/flow/node/helpers.ts @@ -65,7 +65,9 @@ export const getVisibleActions = (renderNode: RenderNode): Action[] => { return renderNode.node.actions.filter((action: Action) => action.type !== Types.set_run_result); } - return renderNode.node.actions; + //return renderNode.node.actions; + //PE-207: hide ticket feature + return renderNode.node.actions.filter((action: Action) => action.type !== Types.open_ticket); }; export const filterIssuesForAction = ( diff --git a/src/config/interfaces.ts b/src/config/interfaces.ts index 14651c23..c33923cf 100644 --- a/src/config/interfaces.ts +++ b/src/config/interfaces.ts @@ -28,7 +28,7 @@ export enum Types { call_classifier = 'call_classifier', call_resthook = 'call_resthook', call_webhook = 'call_webhook', - //open_ticket = 'open_ticket', PE-207: hide ticket feature + open_ticket = 'open_ticket', send_msg = 'send_msg', send_email = 'send_email', send_broadcast = 'send_broadcast', From 41d27ecccb252a6adf38f7be2cff3ad856a61790 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 16:48:25 -0800 Subject: [PATCH 05/15] PE-207: visible action flow filter needs to affect both IF branches. --- src/components/flow/node/helpers.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/flow/node/helpers.ts b/src/components/flow/node/helpers.ts index aed45c38..8455d161 100644 --- a/src/components/flow/node/helpers.ts +++ b/src/components/flow/node/helpers.ts @@ -59,16 +59,23 @@ export const getResultName = (node: FlowNode) => { } }; +// export const getVisibleActions = (renderNode: RenderNode): Action[] => { +// // subflow nodes hide their set run results +// if (getType(renderNode) === Types.split_by_subflow) { +// return renderNode.node.actions.filter((action: Action) => action.type !== Types.set_run_result); +// } +// +// return renderNode.node.actions; +// }; +//PE-207: hide ticket feature export const getVisibleActions = (renderNode: RenderNode): Action[] => { + let actionList = renderNode.node.actions.filter((action: Action) => action.type !== Types.open_ticket); // subflow nodes hide their set run results - if (getType(renderNode) === Types.split_by_subflow) { - return renderNode.node.actions.filter((action: Action) => action.type !== Types.set_run_result); + if ( getType(renderNode) === Types.split_by_subflow ) { + actionList = actionList.filter((action: Action) => action.type !== Types.set_run_result); } - - //return renderNode.node.actions; - //PE-207: hide ticket feature - return renderNode.node.actions.filter((action: Action) => action.type !== Types.open_ticket); -}; + return actionList; +} export const filterIssuesForAction = ( nodeUUID: string, From 32f2844df28f67557a8baa3b58f0d80a2d404898 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 16:49:00 -0800 Subject: [PATCH 06/15] PE-207: visible action flow filter needs to affect both IF branches. --- src/components/flow/node/helpers.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/flow/node/helpers.ts b/src/components/flow/node/helpers.ts index 8455d161..f9fc4224 100644 --- a/src/components/flow/node/helpers.ts +++ b/src/components/flow/node/helpers.ts @@ -69,13 +69,15 @@ export const getResultName = (node: FlowNode) => { // }; //PE-207: hide ticket feature export const getVisibleActions = (renderNode: RenderNode): Action[] => { - let actionList = renderNode.node.actions.filter((action: Action) => action.type !== Types.open_ticket); + let actionList = renderNode.node.actions.filter( + (action: Action) => action.type !== Types.open_ticket + ); // subflow nodes hide their set run results - if ( getType(renderNode) === Types.split_by_subflow ) { + if (getType(renderNode) === Types.split_by_subflow) { actionList = actionList.filter((action: Action) => action.type !== Types.set_run_result); } return actionList; -} +}; export const filterIssuesForAction = ( nodeUUID: string, From 7961e0fcc9af55d767b471e7c6921502f3a2cb3f Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Thu, 1 Feb 2024 19:54:23 -0800 Subject: [PATCH 07/15] PE-207: revert code change; change config visibility instead. --- src/components/flow/node/helpers.ts | 17 +++-------------- src/config/typeConfigs.ts | 3 ++- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/components/flow/node/helpers.ts b/src/components/flow/node/helpers.ts index f9fc4224..b465fc36 100644 --- a/src/components/flow/node/helpers.ts +++ b/src/components/flow/node/helpers.ts @@ -59,24 +59,13 @@ export const getResultName = (node: FlowNode) => { } }; -// export const getVisibleActions = (renderNode: RenderNode): Action[] => { -// // subflow nodes hide their set run results -// if (getType(renderNode) === Types.split_by_subflow) { -// return renderNode.node.actions.filter((action: Action) => action.type !== Types.set_run_result); -// } -// -// return renderNode.node.actions; -// }; -//PE-207: hide ticket feature export const getVisibleActions = (renderNode: RenderNode): Action[] => { - let actionList = renderNode.node.actions.filter( - (action: Action) => action.type !== Types.open_ticket - ); // subflow nodes hide their set run results if (getType(renderNode) === Types.split_by_subflow) { - actionList = actionList.filter((action: Action) => action.type !== Types.set_run_result); + return renderNode.node.actions.filter((action: Action) => action.type !== Types.set_run_result); } - return actionList; + + return renderNode.node.actions; }; export const filterIssuesForAction = ( diff --git a/src/config/typeConfigs.ts b/src/config/typeConfigs.ts index d9571b08..8e48db31 100644 --- a/src/config/typeConfigs.ts +++ b/src/config/typeConfigs.ts @@ -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 }, { From 32a7ea65ce46a01a9d39d341ada8bdb8cc1b568b Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 07:00:52 -0800 Subject: [PATCH 08/15] gha: auto tag commit. --- .github/workflows/tag-commit.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/tag-commit.yml diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml new file mode 100644 index 00000000..9e9ee6c3 --- /dev/null +++ b/.github/workflows/tag-commit.yml @@ -0,0 +1,30 @@ +name: tag commit + +on: + push: + branches-ignore: + - main + - master + +jobs: + tag-commit: + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: "Create Version" + id: version_cfg + run: |- + VER_BUILD=$(date +%-H%M) + VERSION_STR="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" + echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT + + - 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/v${{ steps.version_cfg.outputs.VERSION_STR }}', + sha: context.sha + }) From a7d5e1d3d87ae6c20e75c240ad2c6f9b04600316 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 07:12:19 -0800 Subject: [PATCH 09/15] gha: ensure no 0-leading nums. --- .github/workflows/tag-commit.yml | 2 +- .github/workflows/tag-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index 9e9ee6c3..88a13c9a 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -15,7 +15,7 @@ jobs: id: version_cfg run: |- VER_BUILD=$(date +%-H%M) - VERSION_STR="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" + VERSION_STR="$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}" echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT - name: "Create Tag" diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index b592aed7..bc756427 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -16,7 +16,7 @@ jobs: id: version_cfg run: |- VER_BUILD=$(date +%-H%M) - VERSION_NUM="$(date +%y).$(date +%m).$(date +%-d)-${VER_BUILD:0:3}" + VERSION_NUM="$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}" echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT - name: "Tag release" From 3685686bbb554d3f4a41274fcb0365e1eade05c6 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 08:49:15 -0800 Subject: [PATCH 10/15] gha: auto-tag does not trigger tag build, doh! --- .github/workflows/build-node-app.yml | 49 ++++++++--------------- .github/workflows/tag-commit.yml | 18 +++++++-- .github/workflows/tag-release.yml | 2 +- .github/workflows/util-build-node-app.yml | 47 ++++++++++++++++++++++ 4 files changed, 79 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/util-build-node-app.yml diff --git a/.github/workflows/build-node-app.yml b/.github/workflows/build-node-app.yml index 11599377..e156005f 100644 --- a/.github/workflows/build-node-app.yml +++ b/.github/workflows/build-node-app.yml @@ -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@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-${{ 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 }} diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index 88a13c9a..ec0aa2e9 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -1,4 +1,4 @@ -name: tag commit +name: "Tag Commit & Build" on: push: @@ -7,12 +7,14 @@ on: - master jobs: - tag-commit: + build_cfg: runs-on: ubuntu-latest + outputs: + VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }} permissions: write-all steps: - name: "Create Version" - id: version_cfg + id: config_step run: |- VER_BUILD=$(date +%-H%M) VERSION_STR="$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}" @@ -25,6 +27,14 @@ jobs: github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: 'refs/tags/v${{ steps.version_cfg.outputs.VERSION_STR }}', + ref: 'refs/tags/v${{ 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 }} diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index bc756427..1e99c00c 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -1,4 +1,4 @@ -name: tag release +name: "Tag Release" on: push: diff --git a/.github/workflows/util-build-node-app.yml b/.github/workflows/util-build-node-app.yml new file mode 100644 index 00000000..c4222332 --- /dev/null +++ b/.github/workflows/util-build-node-app.yml @@ -0,0 +1,47 @@ +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 + env: + VERSION_STR: ${{ inputs.version_str }} + 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-v${VERSION_STR#v}", + "dst_folder": "/data/repo/engage/floweditor" + }, + "callback": { + "repository": "${{ github.repository }}", + "event_type": "build_node_success", + "error_type": "build_node_error" + } + } + #endjob trigger-build From b9016bedcf17b3abb3d3d705a75ccb3b5dc35568 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 08:55:12 -0800 Subject: [PATCH 11/15] gha: need ./.github... not just .github... when ref utils. --- .github/workflows/build-node-app.yml | 2 +- .github/workflows/tag-commit.yml | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build-node-app.yml b/.github/workflows/build-node-app.yml index e156005f..1afc4f7d 100644 --- a/.github/workflows/build-node-app.yml +++ b/.github/workflows/build-node-app.yml @@ -21,7 +21,7 @@ jobs: 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 + uses: ./.github/workflows/util-build-node-app.yml secrets: inherit with: version_str: ${{ needs.build_cfg.outputs.VERSION_STR }} diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index ec0aa2e9..cf75b2c5 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -30,11 +30,3 @@ jobs: ref: 'refs/tags/v${{ 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 }} From f9b6996f93105c5a83ba3dc460db1ca8f95c0eae Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 08:56:51 -0800 Subject: [PATCH 12/15] gha: auto-tag does not run gha, too. --- .github/workflows/tag-commit.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index cf75b2c5..e26f1457 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -30,3 +30,11 @@ jobs: ref: 'refs/tags/v${{ 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 }} From c1fda9d907104725b8fb65cf37ce997134832f78 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 08:59:15 -0800 Subject: [PATCH 13/15] gha: add notice for what is being built since tag is auto generated. --- .github/workflows/tag-commit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index e26f1457..05c634e5 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -19,6 +19,7 @@ jobs: VER_BUILD=$(date +%-H%M) VERSION_STR="$(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 From 3e96668c8852cf405a8bf3853baa26307fa8e543 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 09:05:58 -0800 Subject: [PATCH 14/15] gha: tweaks. --- .github/workflows/tag-commit.yml | 4 ++-- .github/workflows/tag-release.yml | 6 +++--- .github/workflows/util-build-node-app.yml | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index 05c634e5..62dd9e89 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -17,7 +17,7 @@ jobs: id: config_step run: |- VER_BUILD=$(date +%-H%M) - VERSION_STR="$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}" + 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}" @@ -28,7 +28,7 @@ jobs: github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: 'refs/tags/v${{ steps.config_step.outputs.VERSION_STR }}', + ref: 'refs/tags/${{ steps.config_step.outputs.VERSION_STR }}', sha: context.sha }) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 1e99c00c..9d1f7d7c 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -16,7 +16,7 @@ jobs: id: version_cfg run: |- VER_BUILD=$(date +%-H%M) - VERSION_NUM="$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}" + VERSION_NUM="v$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}" echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT - name: "Tag release" @@ -24,7 +24,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v${{ steps.version_cfg.outputs.VERSION_NUM }} - release_name: v${{ steps.version_cfg.outputs.VERSION_NUM }} + tag_name: ${{ steps.version_cfg.outputs.VERSION_NUM }} + release_name: ${{ steps.version_cfg.outputs.VERSION_NUM }} draft: false prerelease: false diff --git a/.github/workflows/util-build-node-app.yml b/.github/workflows/util-build-node-app.yml index c4222332..540b41cc 100644 --- a/.github/workflows/util-build-node-app.yml +++ b/.github/workflows/util-build-node-app.yml @@ -12,8 +12,6 @@ jobs: trigger-build: runs-on: ubuntu-latest environment: default - env: - VERSION_STR: ${{ inputs.version_str }} steps: - name: "Trigger Node Build" uses: peter-evans/repository-dispatch@v3 @@ -35,7 +33,7 @@ jobs: "output_folder": "build" }, "filerepo": { - "file_name": "floweditor-v${VERSION_STR#v}", + "file_name": "floweditor-${{ inputs.version_str }}", "dst_folder": "/data/repo/engage/floweditor" }, "callback": { From e2af7f7b139b345e3fc4979cfc0f5cb16d070984 Mon Sep 17 00:00:00 2001 From: Ryan Fischbach Date: Fri, 2 Feb 2024 09:18:43 -0800 Subject: [PATCH 15/15] gha: also ignore develop branch on auto-tag. [skip ci] --- .github/workflows/tag-commit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml index 62dd9e89..6262b5d0 100644 --- a/.github/workflows/tag-commit.yml +++ b/.github/workflows/tag-commit.yml @@ -3,6 +3,7 @@ name: "Tag Commit & Build" on: push: branches-ignore: + - develop - main - master