-
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
Ron Mallory
committed
Feb 9, 2024
1 parent
afdaca8
commit ae68cf8
Showing
5 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Tagging Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'stuff/**' | ||
|
||
jobs: | ||
tag-on-change: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get current date and time | ||
id: datetime | ||
run: echo "::set-output name=timestamp::$(date +'%Y%m%d%H%M%S')" | ||
|
||
- name: Create tag | ||
run: | | ||
CHANGED_DIRS=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^stuff/' | awk -F'/' '{print $1"/"$2}' | uniq) | ||
if [ ! -z "$CHANGED_DIRS" ]; then | ||
for DIR in $CHANGED_DIRS; do | ||
TAG_NAME="${DIR//\//-}-${{ steps.datetime.outputs.timestamp }}" | ||
git tag $TAG_NAME | ||
git push origin $TAG_NAME | ||
echo "Tag $TAG_NAME created for changes in $DIR" | ||
done | ||
else | ||
echo "No changes detected in stuff/* directories." | ||
fi |
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,3 @@ | ||
{ | ||
"sarif-viewer.connectToGithubCodeScanning": "off" | ||
} |
Empty file.
Empty file.
Empty file.