File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed
Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Submission Snapshot Lint
2+ on :
3+ push :
4+ paths :
5+ - ' submission-snapshot/**'
6+
7+ jobs :
8+ build-pusg :
9+ runs-on : ubuntu-latest
10+
11+ permissions :
12+ contents : read
13+ packages : write
14+
15+ steps :
16+ - uses : actions/checkout@v5
17+
18+ - name : Log in to GitHub Container Registry
19+ uses : docker/login-action@v3
20+ with :
21+ registry : ghcr.io
22+ username : ${{ github.actor }}
23+ password : ${{ secrets.GITHUB_TOKEN }}
24+
25+ - name : Short commit SHA
26+ run : echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
27+
28+ - name : Prepare image name
29+ run : |
30+ IMAGE_NAME="ghcr.io/${GITHUB_REPOSITORY,,}/submission-snapshot:${SHORT_SHA}"
31+ echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
32+
33+ - name : Build Docker image
34+ run : |
35+ echo "Building image: $IMAGE_NAME"
36+ docker build -t $IMAGE_NAME ./submission-snapshot
37+
38+ - name : Push Docker image
39+ run : |
40+ echo "Pushing image: $IMAGE_NAME"
41+ docker push $IMAGE_NAME
Original file line number Diff line number Diff line change 1+ FROM ghcr.io/astral-sh/uv:0.10.7-python3.14-trixie-slim
2+
3+
4+ # Setup a non-root user
5+ RUN groupadd --system --gid 999 pcgl \
6+ && useradd --system --gid 999 --uid 999 --create-home pcgl
7+
8+
9+ WORKDIR /workflow
10+
11+ COPY pyproject.toml .
12+ COPY uv.lock .
13+ COPY main.py .
14+
15+ # Install uv
16+
17+ # Disable development dependencies
18+ ENV UV_NO_DEV=1
19+
20+ # Install dependencies
21+ RUN uv sync --locked
22+
23+ USER pcgl
24+
25+ # Run workflow
26+ CMD [ "uv" , "run" , "main.py" ]
You can’t perform that action at this time.
0 commit comments