Skip to content

Update PreviewChanges.yml #989

Update PreviewChanges.yml

Update PreviewChanges.yml #989

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

View workflow run for this annotation

GitHub Actions / Preview tModLoader

Invalid workflow file

The workflow is not valid. .github/workflows/PreviewChanges.yml (Line: 31, Col: 15): Unexpected symbol: '%'. Located at position 58 within expression: steps.date.outputs.date < 11 || steps.date.outputs.month % 2 == 1
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 }}