2048|slideDown #81
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: "2048" | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
move: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.issue.title, '2048|') | |
steps: | |
# Set up environment variables | |
- name: Setting up environment | |
run: | | |
echo "ISSUE_NUMBER=${{ github.event.issue.number }}" >> $GITHUB_ENV | |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
echo "REPOSITORY_OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
# Set up a Python 3.8 (64-bit) instance | |
- name: Setting up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
architecture: "x64" | |
# Use pip to install the dependencies and then run the script | |
- name: Play 2048 | |
run: | | |
pip install -r requirements.txt | |
python main.py | |
# Create new commit with the changed files and push it to GitHub | |
- uses: EndBug/add-and-commit@v5 | |
with: | |
add: '.' | |
author_name: github-actions[bot] | |
author_email: github-actions[bot]@users.noreply.github.com | |
message: '${{ github.event.issue.title }} by ${{ github.event.issue.user.login }}' | |
push: true | |
env: | |
# This is necessary in order to push a commit to the repo | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |