Skip to content

Commit 2fd674a

Browse files
committed
Add workflow to update flag file on push to main
1 parent 3d3ae5c commit 2fd674a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/update-flags.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Workflow for updating flags in the repository
2+
name: Update Flags
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
update_flags:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v3
16+
- name: Update Flag File
17+
run: |
18+
echo "Last updated: $(date -u)" > flag.txt
19+
- name: Commit and Push Flag
20+
run: |
21+
git config user.name "github-actions[bot]"
22+
git config user.email "github-actions[bot]@users.noreply.github.com"
23+
git add flag.txt
24+
git commit -m "Update flag on directory change" || echo "No changes to commit"
25+
git push

0 commit comments

Comments
 (0)