-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
136 additions
and
33 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
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,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 }} |
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,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 |
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,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 |
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