Skip to content

Improve task allocation logic and error handling #14

Improve task allocation logic and error handling

Improve task allocation logic and error handling #14

Workflow file for this run

name: gagan3012
on:
push:
branches:
- '*'
- '!**/merge'
tags:
- '*' # build on any tag
- '!*/merge'
pull_request:
branches:
- '*'
- '!**/merge'
workflow_dispatch:
env:
python-version: "3.10"
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
# - name: Dump github context
# run: echo "$GITHUB_CONTEXT"
# shell: bash
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
# ensure permissions are enabled in the repository settings -> Actions -> General -> Workflow Permissions: Read and Write permissions
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build & Push the Docker image to github ghcr
run: |
docker buildx build . --build-arg PYTHON_VERSION=3.10 --file Dockerfile --tag ghcr.io/gagan3012/flask_v1:latest --push
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to Render
uses: johnbeynon/[email protected]
with:
service-id: ${{ secrets.RENDER_SERVICE_ID }}
api-key: ${{ secrets.RENDER_API_KEY }}