Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
0YJ1 authored Apr 3, 2024
1 parent 8e08ae2 commit 5df66a3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto-Green

on:
workflow_dispatch:
inputs:
log:
description: "Commit Log"
required: true
default: "a commit a day keeps your girlfriend away"
schedule:
- cron: "0 0 * * 0-5"

jobs:
autogreen:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Pull
run: |
git config --local user.name "${{ github.actor }}"
git config --local user.email "[email protected]"
git remote set-url origin https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git pull --rebase
- name: Commit (default)
if: github.event.inputs.log == 0
run: git commit --allow-empty -m "a commit a day keeps your girlfriend away"

- name: Commit (input)
if: github.event.inputs.log != 0
run: git commit --allow-empty -m "${{ github.event.inputs.log }}"

- name: Push
run: git push

0 comments on commit 5df66a3

Please sign in to comment.