File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Docker image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - pyproject.toml
9+
10+ jobs :
11+ push_to_registry :
12+ name : Push Docker image to GitHub Packages
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read # required for actions/checkout
16+ packages : write # required for pushing to ghcr.io
17+ steps :
18+ - name : Check out the repo
19+ uses : actions/checkout@v4
20+
21+ - name : Extract version
22+ id : extract_version
23+ run : echo "VERSION=$(grep 'version =' pyproject.toml | sed -e 's/version = "\(.*\)"/\1/')-$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
24+
25+ - name : Log in to GitHub Container Registry
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ - name : Build and push Docker image
33+ uses : docker/build-push-action@v5
34+ with :
35+ context : .
36+ push : true
37+ tags : |
38+ ghcr.io/sysdiglabs/sysdig-mcp-server:latest
39+ ghcr.io/sysdiglabs/sysdig-mcp-server:v${{ env.VERSION }}
You can’t perform that action at this time.
0 commit comments