-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.15 KB
/
docker.yml
File metadata and controls
36 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: docker
on:
workflow_run:
workflows: ["tests"]
types:
- completed
workflow_dispatch:
jobs:
build:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run && github.event.workflow_run.conclusion == 'success') }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "tsukisama9292" --password-stdin
- name: Extract version from pyproject.toml
id: version
run: |
version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
echo "tag=$version" >> "$GITHUB_OUTPUT"
echo "VERSION: $version"
- name: Build Docker image
run: |
docker build -f dockerfile -t tsukisama9292/mcp_websearch:latest -t tsukisama9292/mcp_websearch:${{ steps.version.outputs.tag }} --no-cache .
- name: Push Docker image
run: |
docker push tsukisama9292/mcp_websearch:latest
docker push tsukisama9292/mcp_websearch:${{ steps.version.outputs.tag }}