Skip to content

Commit

Permalink
chore: testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Mallory committed Feb 9, 2024
1 parent afdaca8 commit ae68cf8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"sarif-viewer.connectToGithubCodeScanning": "off"
}
Empty file added stuff/stuff001/.gitignore
Empty file.
Empty file added stuff/stuff002/.gitignore
Empty file.
Empty file added stuff/stuff003/.gitignore
Empty file.

0 comments on commit ae68cf8

Please sign in to comment.