Skip to content

fix the batchName not define bug #46

fix the batchName not define bug

fix the batchName not define bug #46

Workflow file for this run

name: CI dev
on:
push:
branches:
- main
paths:
- 'worker-image/**'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PERSONAL_ACCESS_TOKEN }}
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./worker-image/workers
file: ./worker-image/workers/Dockerfile
push: true
tags: lightningsagar/worker:${{ github.sha }}
- name: Clone staging ops/repo and Documentation
env:
GITHUB_PAT: ${{ secrets.PAT }}
run: |
git clone https://github.com/lightning-sagar/Judge.git
cd Judge
sed -i "s|image: lightningsagar/worker:.*|image: lightningsagar/worker:${{ github.sha }}|" worker-ops/judge-workers.yml
sed -i "s|lightningsagar/worker:.*|lightningsagar/worker:${{ github.sha }}|" docs/src/app/selfhost/page.tsx
git config --global user.name "GitHub Actions Bot"
git config --global user.email "action@github.com"
git add .
git commit -m "Updated the image tag"
git push https://${GITHUB_PAT}@github.com/lightning-sagar/Judge.git main
echo "Completed and updated the Docs."