Generate Sourcemint snapshot.json reports for Github Workflow Jobs.
Job step configuration:
- name: "[sm.act] Set env"
uses: sourcemint/sm.act.github.actions/.github/actions/sm-act-set-env@master
- name: "[sm.act] Show env"
uses: sourcemint/sm.act.github.actions/.github/actions/sm-act-show-env@master
Sets and shows the following environment variables:
SM_ACT_REPO_GUID=3-02453f6-7-136
SM_ACT_REPO_URI=github.com/sourcemint/sm.act.github.actions
SM_ACT_GIT_REMOTE=git@github.com:sourcemint/sm.act.github.actions.git
SM_ACT_GIT_REF=refs/heads/dev
SM_ACT_GIT_SHA=3c853499d79e33a952cc1f6f61b44b212905e7fa
SM_ACT_GIT_SHA7=3c85349
SM_ACT_GIT_SHA3=3c8
SM_ACT_RUN_ID=github-actions-266387575
SM_ACT_NAME=Snapshot
SM_ACT_ACTOR_URI=github.com/cadorn
SM_ACT_TRIGGER_EVENT=push
SM_ACT_COMPONENT_ID=/
SM_ACT_GIT_BRANCH=dev
SM_ACT_GIT_COMMIT_AUTHOR=Christoph Dorn <christoph@christophdorn.com>
SM_ACT_GIT_COMMIT_DATE=Mon Sep 21 23:12:30 2020 -0700
SM_ACT_GIT_COMMIT_MESSAGE=wip
SM_ACT_ID=3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/:Snapshot
SM_ACT_FSID=3-02453f6-7-136/github.com~sourcemint~sm.act.github.actions/~/Snapshot
SM_ACT_SNAPSHOT_ID=20-09-22:3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/:Snapshot:3c85349:dev:0613-04:github.com/cadorn:github-actions-266387575
SM_ACT_SNAPSHOT_ID7=5048a48
SM_ACT_SNAPSHOT_HID=20-09-22:78ae465:e9a0cb3:42099b4:b08ae37:3c85349:34c6fce:0613-04:57e542e:d4dcbbe
SM_ACT_SNAPSHOT_FSID=20-09-22/3-02453f6-7-136/github.com~sourcemint~sm.act.github.actions/~/Snapshot/3c85349/dev/0613-04/github.com~cadorn/github-actions-266387575
SM_ACT_SNAPSHOT_ASPECT=Snapshot
SM_ACT_SNAPSHOT_ASPECT_OF=3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/
Job step configuration:
- name: "[sm.act] Write snapshot report"
uses: sourcemint/sm.act.github.actions/.github/actions/sm-act-write-snapshot@master
Reports are written to a _/gi0.Sourcemint.org-sm.act/snapshots branch and stored at:
._/gi0.Sourcemint.org~sm.act/snapshots/<SM_ACT_SNAPSHOT_FSID>.json- The actual JSON report shown below.
- Relative path mappings to
<SM_ACT_SNAPSHOT_FSID>.json:._/gi0.Sourcemint.org~sm.act/snapshots-latest/<SM_ACT_FSID>._/gi0.Sourcemint.org~sm.act/snapshots-id/<SM_ACT_SNAPSHOT_ID>._/gi0.Sourcemint.org~sm.act/snapshots-hid/<SM_ACT_SNAPSHOT_HID>._/gi0.Sourcemint.org~sm.act/snapshots-id7/<SM_ACT_SNAPSHOT_ID7>
{
"aspect": "Snapshot",
"aspectOf": "3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/",
"id": "20-09-22:3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/:Snapshot:3c85349:dev:0613-04:github.com/cadorn:github-actions-266387575",
"id7": "5048a48",
"hid": "20-09-22:78ae465:e9a0cb3:42099b4:b08ae37:3c85349:34c6fce:0613-04:57e542e:d4dcbbe",
"fsid": "20-09-22/3-02453f6-7-136/github.com~sourcemint~sm.act.github.actions/~/Snapshot/3c85349/dev/0613-04/github.com~cadorn/github-actions-266387575",
"logs": {
"url": "https://api.github.com/repos/sourcemint/sm.act.github.actions/actions/runs/266387575/logs"
},
"artifacts": {
"url": "https://api.github.com/repos/sourcemint/sm.act.github.actions/actions/runs/266387575/artifacts"
},
"meta": {
"REPO_GUID": "3-02453f6-7-136",
"REPO_URI": "github.com/sourcemint/sm.act.github.actions",
"GIT_REMOTE": "git@github.com:sourcemint/sm.act.github.actions.git",
"GIT_REF": "refs/heads/dev",
"GIT_SHA": "3c853499d79e33a952cc1f6f61b44b212905e7fa",
"GIT_SHA7": "3c85349",
"GIT_SHA3": "3c8",
"RUN_ID": "github-actions-266387575",
"NAME": "Snapshot",
"ACTOR_URI": "github.com/cadorn",
"TRIGGER_EVENT": "push",
"COMPONENT_ID": "/",
"GIT_BRANCH": "dev",
"GIT_COMMIT_AUTHOR": "Christoph Dorn <christoph@christophdorn.com>",
"GIT_COMMIT_DATE": "Mon Sep 21 23:12:30 2020 -0700",
"GIT_COMMIT_MESSAGE": "wip",
"ID": "3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/:Snapshot",
"FSID": "3-02453f6-7-136/github.com~sourcemint~sm.act.github.actions/~/Snapshot",
"SNAPSHOT_ID": "20-09-22:3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/:Snapshot:3c85349:dev:0613-04:github.com/cadorn:github-actions-266387575",
"SNAPSHOT_ID7": "5048a48",
"SNAPSHOT_HID": "20-09-22:78ae465:e9a0cb3:42099b4:b08ae37:3c85349:34c6fce:0613-04:57e542e:d4dcbbe",
"SNAPSHOT_FSID": "20-09-22/3-02453f6-7-136/github.com~sourcemint~sm.act.github.actions/~/Snapshot/3c85349/dev/0613-04/github.com~cadorn/github-actions-266387575",
"SNAPSHOT_ASPECT": "Snapshot",
"SNAPSHOT_ASPECT_OF": "3-02453f6-7-136:github.com/sourcemint/sm.act.github.actions:/"
},
"env": {}
}
Snapshots are activated on Named Streams using ./bin/activate [--local].
Active snapshot references are written to a _/gi0.Sourcemint.org-sm.act/snapshots-active branch and stored at:
._/gi0.Sourcemint.org~sm.act/snapshots-active/<SM_ACT_COMPONENT_ID>/<SM_ACT_NAME>/snapshotId
Upon activation a git tag is set at _/gi0.Sourcemint.org-sm.act/snapshots-active/<SM_ACT_COMPONENT_ID>/<SM_ACT_NAME>/<StreamName>/<Date>-<Time>-<SM_ACT_GIT_SHA7> and the following job step configuration runs:
- name: "[sm.act] Activate snapshot"
uses: sourcemint/sm.act.github.actions/.github/actions/sm-act-activate-snapshot@master
This step activates the snapshot using ./#!/gi0.Sourcemint.org/#!sm.act.activate.inf.json.
Run tests:
npm install npm test
git checkout -b dev- Make changes & push to github
- Wait for github actions to complete running
./bin/activate --local
Copyright © 2020 Christoph Dorn. Licensed under the OSL License.