-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from awslabs/github-wf
daily tag gh flow added
- Loading branch information
Showing
2 changed files
with
51 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,30 @@ | ||
name: Create daily tags | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- 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) | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
daily-tag: | ||
name: "Create tag on main for changes in last 24 hours" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: "Get changes and create TAG" | ||
run: | | ||
CHANGES=$(git log --since="1 day ago" --name-only --pretty=format: ) | ||
if [ "x$CHANGES" != "x" ] ; then | ||
TAG="daily-$(date +%Y.%m.%d)" | ||
git tag $TAG | ||
git push origin $TAG | ||
echo "Created a new tag: $TAG" | ||
else | ||
echo "No changes identified in last 24 hours" | ||
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,21 @@ | ||
name: Dependabot auto-merge | ||
|
||
on: | ||
pull_request_target: | ||
branches: [ main ] | ||
types: [ opened ] | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
enableAutoMerge: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
steps: | ||
- name: Enable auto-merge for Dependabot PRs | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |