forked from BlueSkyClouds/time-commit
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1.06 KB
/
Copy pathcommit.yml
File metadata and controls
41 lines (32 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Github Actions Commit
# Replase the fallowing according to your needs
# GITHUB_USERNMAE: 'BlueSkyClouds'
# GITHUB_REPO: 'time-commit'
#
# CRON_TIME: '00 00 * * *'
on:
workflow_dispatch:
schedule: # Everday
- cron: '00 00 * * *'
repository_dispatch: # For requests bassed commit
types: start_action # <<< WORK HERE
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Getting the repo
uses: actions/checkout@v2
- name: Re setting the url for `origin`
run: |
git remote set-url origin https://BlueSkyClouds:${{ secrets.GITHUB_TOKEN }}@github.com/BlueSkyClouds/time-commit.git
- name: Adding git info
run: |
git config --global user.name "BlueSkyClouds"
git config --global user.email "${{ secrets.EMAIL }}" # Added email in secrets
- name: Creating an empty commit
run: |
git commit --allow-empty -m "My amazing commit"
- name: Finilly pushing the repo
run: |
git push origin master