Skip to content

Commit da17069

Browse files
authored
Merge pull request #61 from awslabs/github-wf
daily tag gh flow added
2 parents 3a80cdf + 0d1f651 commit da17069

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/daily-tag.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Create daily tags
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 1 * * *" # min(0 - 59) hour(0 - 23) day of the month (1 - 31) month (1 - 12 or JAN-DEC) day of the week (0 - 6 or SUN-SAT)
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
daily-tag:
13+
name: "Create tag on main for changes in last 24 hours"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: "Get changes and create TAG"
19+
run: |
20+
CHANGES=$(git log --since="1 day ago" --name-only --pretty=format: )
21+
22+
if [ "x$CHANGES" != "x" ] ; then
23+
TAG="daily-$(date +%Y.%m.%d)"
24+
git tag $TAG
25+
git push origin $TAG
26+
27+
echo "Created a new tag: $TAG"
28+
else
29+
echo "No changes identified in last 24 hours"
30+
fi
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Dependabot auto-merge
2+
3+
on:
4+
pull_request_target:
5+
branches: [ main ]
6+
types: [ opened ]
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
enableAutoMerge:
14+
runs-on: ubuntu-latest
15+
if: github.event.pull_request.user.login == 'dependabot[bot]'
16+
steps:
17+
- name: Enable auto-merge for Dependabot PRs
18+
run: gh pr merge --auto --merge "$PR_URL"
19+
env:
20+
PR_URL: ${{github.event.pull_request.html_url}}
21+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)