Skip to content

Instantly share code, notes, and snippets.

@0xInfection
Last active January 6, 2021 19:02
Show Gist options
  • Save 0xInfection/cb8f22df3b45b600506d228390cff24c to your computer and use it in GitHub Desktop.
Save 0xInfection/cb8f22df3b45b600506d228390cff24c to your computer and use it in GitHub Desktop.
Basic automation workflow using GitHub Actions
name: My Custom Automation Setup
on:
# Triggers the workflow when you push a commit to master branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest # The type of os that the job will run on
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8 # Specifies your python version
# Sets up the dependencies using pip, either manually or using a requirements.txt file
- name: Install all dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests selenium ...
python -m pip install -r requirements.txt
# Run the your script/set of scripts
- name: Run the scripts here
run: |
python script1.py
python script2.py
python script3.py
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment