diff --git a/.github/workflows/build-node-app.yml b/.github/workflows/build-node-app.yml index eddecfb6..1afc4f7d 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@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 }} diff --git a/.github/workflows/tag-commit.yml b/.github/workflows/tag-commit.yml new file mode 100644 index 00000000..6262b5d0 --- /dev/null +++ b/.github/workflows/tag-commit.yml @@ -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 }} diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml new file mode 100644 index 00000000..9d1f7d7c --- /dev/null +++ b/.github/workflows/tag-release.yml @@ -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 diff --git a/.github/workflows/util-build-node-app.yml b/.github/workflows/util-build-node-app.yml new file mode 100644 index 00000000..540b41cc --- /dev/null +++ b/.github/workflows/util-build-node-app.yml @@ -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 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 }, {