Update PreviewChanges.yml #989
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
name: Preview tModLoader | ||
# Controls when the action will run. | ||
on: | ||
# This workflow runs when a push to 1.4.4 branch happens so that it copies over to preview | ||
push: | ||
branches: [1.4.4] | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
MergeToPreview: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Used to determine if preview should freeze | ||
- name: Get current day | ||
id: date | ||
shell: bash | ||
run: | | ||
# stores day of the month | ||
echo "::set-output name=date::$(date +'%d')" | ||
# stores month as a number | ||
echo "::set-output name=month::$(date +'%m')" | ||
- name: Check out repo | ||
# If the condition is TRUE then we setup to merge 1.4.4 into preview. If False, nothing happens | ||
# Allow changes to flow from dev to preview during Month 1 and Month 2 up to the 10th. Freeze 11th to Month 2 end | ||
if: steps.date.outputs.date < 11 || steps.date.outputs.month % 2 == 1 | ||
Check failure on line 31 in .github/workflows/PreviewChanges.yml GitHub Actions / Preview tModLoaderInvalid workflow file
|
||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'refs/heads/1.3' | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
# There is a bug with this that requires the previous step to checkout a different branch then either of two specified | ||
- name: Merge | ||
# If the condition is TRUE then we merge 1.4.4 into preview. If False, nothing happens | ||
if: steps.date.outputs.date < 0 #|| steps.date.outputs.month % 2 == 1 | ||
uses: tModLoader/gh-action-nightly-merge@master | ||
with: | ||
stable_branch: '1.4.4' | ||
development_branch: 'preview' | ||
allow_ff: true | ||
ff_only: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TMODLOADERBOT_TOKEN }} |