Skip to content

Commit 345859d

Browse files
munkyukim86claude
andcommitted
ci: add Docker publish to release workflow
Tag push now triggers both PyPI and Docker builds in parallel. Docker image pushed to ghcr.io/eijex/factorforge-cds:{version} and :latest. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1d83f1a commit 345859d

1 file changed

Lines changed: 34 additions & 4 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: Publish to PyPI
1+
name: Publish
22

33
on:
44
push:
55
tags:
66
- "v*"
77

88
jobs:
9-
publish:
10-
name: Build and publish
9+
pypi:
10+
name: Publish to PyPI
1111
runs-on: ubuntu-latest
1212
environment: pypi
1313
permissions:
14-
id-token: write # required for trusted publishing
14+
id-token: write
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -29,3 +29,33 @@ jobs:
2929

3030
- name: Publish to PyPI
3131
uses: pypa/gh-action-pypi-publish@release/v1
32+
33+
docker:
34+
name: Build and push Docker image
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
packages: write
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Log in to GitHub Container Registry
44+
uses: docker/login-action@v3
45+
with:
46+
registry: ghcr.io
47+
username: ${{ github.actor }}
48+
password: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Extract version from tag
51+
id: version
52+
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
53+
54+
- name: Build and push
55+
uses: docker/build-push-action@v5
56+
with:
57+
context: .
58+
push: true
59+
tags: |
60+
ghcr.io/eijex/factorforge-cds:${{ steps.version.outputs.VERSION }}
61+
ghcr.io/eijex/factorforge-cds:latest

0 commit comments

Comments
 (0)