Skip to content

feat(stockbot): init #3

feat(stockbot): init

feat(stockbot): init #3

Workflow file for this run

name: Python Build and Docker Image Build/Push
on:
push:
branches:
- main # Trigger on push to the main branch
pull_request:
branches:
- main # Trigger on pull request to the main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.11.2
uses: actions/setup-python@v4
with:
python-version: 3.11.2
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Generate Token
id: generate-token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ steps.generate-token.outputs.token }}
- name: Build Docker image
run: |
docker build -t ghcr.io/unusualpseudo/stockbot:latest .
- name: Push Docker image
run: |
docker push ghcr.io/unusualpseudo/stockbot:latest