File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Docker image (GHRC)
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+ USERNAME : ${{ github.actor }}
11+
12+ jobs :
13+ push_to_registry_ghrc :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ packages : write
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Log in to the Container registry
23+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ env.USERNAME }}
27+ password : ${{ secrets.TOKEN }}
28+
29+ - name : Extract metadata (tags, labels) for Docker
30+ id : meta
31+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
32+ with :
33+ tags : type=raw,value=latest
34+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+
36+ - name : Build and push Docker image
37+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
38+ with :
39+ context : .
40+ file : Dockerfile
41+ push : true
42+ tags : ${{ steps.meta.outputs.tags }}
43+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22FROM ubuntu:22.04
3+ LABEL org.opencontainers.image.source=https://github.com/Dpbm/snake-ai
34
45ENV TZ "America/New_York"
56ENV DEBIAN_FRONTEND noninteractive
You can’t perform that action at this time.
0 commit comments