Skip to content

initial memory game code #3861

initial memory game code

initial memory game code #3861

Workflow file for this run

name: Build server
on:
push:
paths:
- '.github/workflows/server.yml'
- 'app/**'
- 'conf/**'
- 'modules/**'
- 'project/**'
- 'translation/**'
- 'build.sbt'
- 'lila'
- 'conf/application.conf.default'
- '.sbtopts.default'
#add front end options to ensure full build gets triggered
- 'public/**'
- 'ui/**'
- 'package.json'
- 'pnpm-lock.yaml'
branches-ignore:
- 'l10n_master'
pull_request:
paths:
- '.github/workflows/server.yml'
- 'app/**'
- 'conf/**'
- 'modules/**'
- 'project/**'
- 'translation/source/**'
- 'build.sbt'
- 'lila'
- 'conf/application.conf.default'
- '.sbtopts.default'
#add front end options to ensure full build gets triggered
- 'public/**'
- 'ui/**'
- 'package.json'
- 'pnpm-lock.yaml'
jobs:
openjdk17:
runs-on: ubuntu-20.04
steps:
- name: Check if organization member
id: check_org_member
uses: Mind-Sports-Games/[email protected]
with:
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Failed
if: ${{ steps.check_org_member.outputs.result == 'false' }}
run: |
echo User Does Not Belong to Mind-Sports-Games
exit 1
- name: Check Passed
run: echo The actor is an organization member
- uses: actions/checkout@v4
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MSO_CI_SSH_KEY }}
- name: Checkout Mind-Sports-Games/lila-maven
uses: actions/checkout@v4
with:
repository: Mind-Sports-Games/lila-maven
ssh-key: ${{ secrets.MSO_CI_SSH_KEY }}
path: deps/lila-maven
- uses: actions/cache@v4
with:
path: |
~/.sbt
~/.ivy2/cache
key: ${{ runner.os }}-sbt-${{ hashFiles('**/project/build.properties') }}-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/project/Dependencies.scala') }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17.0.5
- run: TZ=UTC git log -1 --date=iso-strict-local --pretty='format:app.version.commit = "%h"%napp.version.date = "%ad"%napp.version.message = """%s"""%n' | tee conf/version.conf
- run: ./lila -Depoll=true "test;stage"
- run: cp LICENSE COPYING.md README.md target/universal/stage && git log -n 1 --pretty=oneline > target/universal/stage/commit.txt
- run: cd target/universal/stage && tar -cvpJf ../../../lila-3.0.tar.xz . && cd -
env:
XZ_OPT: '-0'
- uses: actions/upload-artifact@v4
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.event_name == 'push'
with:
name: lila-server
path: lila-3.0.tar.xz
- name: Master -- Copy file to server
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
uses: appleboy/scp-action@master
with:
host: ${{ secrets.PS_MAIN_HOST }}
username: ${{ secrets.PS_MAIN_USERNAME }}
key: ${{ secrets.MSO_CI_SSH_KEY }}
source: 'lila-3.0.tar.xz'
target: '/tmp/'
- name: Master -- Upgrade application
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
uses: garygrossgarten/github-action-ssh@release
with:
command: /opt/lila/upgrade.sh lila /tmp/lila-3.0.tar.xz
host: ${{ secrets.PS_MAIN_HOST }}
username: ${{ secrets.PS_MAIN_USERNAME }}
privateKey: ${{ secrets.MSO_CI_SSH_KEY }}
- name: Dev -- Copy file to server
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
uses: appleboy/scp-action@master
with:
host: ${{ secrets.PSD_MAIN_HOST }}
username: ${{ secrets.PSD_MAIN_USERNAME }}
key: ${{ secrets.MSO_CI_SSH_KEY }}
source: 'lila-3.0.tar.xz'
target: '/tmp/'
- name: Dev -- Upgrade application
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
uses: garygrossgarten/github-action-ssh@release
with:
command: /opt/lila/upgrade.sh lila /tmp/lila-3.0.tar.xz
host: ${{ secrets.PSD_MAIN_HOST }}
username: ${{ secrets.PSD_MAIN_USERNAME }}
privateKey: ${{ secrets.MSO_CI_SSH_KEY }}