Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 authored Sep 19, 2021
1 parent a22aa5b commit 8bc313a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
push:
branches:
- main

jobs:
create-release:
Expand Down Expand Up @@ -43,24 +46,31 @@ jobs:
echo ::set-env name=GHA_REPO_ALIVE::true
fi
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

- name: Get current time
uses: 1466587594/get-current-time@v2
id: current_time_dashes
with:
format: YYYY-MM-DD
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

- name: Get current time with underscores
uses: 1466587594/get-current-time@v2
id: current_time_underscores
with:
format: YYYY_MM_DD
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

- name: Create release
if: env.GHA_REPO_ALIVE == 'true'
id: create_release
uses: actions/create-release@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly-${{ steps.current_time_dashes.outputs.formattedTime }}
Expand Down

0 comments on commit 8bc313a

Please sign in to comment.