Merge pull request #7 from PatrykIti/feature/docker-image-docs
fix: Enable automatic Docker workflow triggering with PAT token
This commit is contained in:
2
.github/workflows/auto-version.yml
vendored
2
.github/workflows/auto-version.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.PAT }}
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
|
|||||||
17
.github/workflows/build_and_publish_docker.yml
vendored
17
.github/workflows/build_and_publish_docker.yml
vendored
@@ -117,17 +117,21 @@ jobs:
|
|||||||
echo "[View all versions and tags →](https://github.com/${{ github.repository }}/pkgs/container/gemini-mcp-server)" >> $GITHUB_STEP_SUMMARY
|
echo "[View all versions and tags →](https://github.com/${{ github.repository }}/pkgs/container/gemini-mcp-server)" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
- name: Update README with latest image info
|
- name: Update README with latest image info
|
||||||
if: github.ref_type == 'tag' || github.event_name == 'repository_dispatch'
|
if: github.ref_type == 'tag' || (github.event_name == 'repository_dispatch' && github.event.client_payload.pr_number != '')
|
||||||
run: |
|
run: |
|
||||||
# Extract the primary image tag for updating README
|
# Extract the primary image tag for updating README
|
||||||
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||||
# For tag releases, use the version tag
|
# For tag releases, use the version tag
|
||||||
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}"
|
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}"
|
||||||
UPDATE_TYPE="release"
|
UPDATE_TYPE="release"
|
||||||
else
|
elif [[ "${{ github.event_name }}" == "repository_dispatch" && "${{ github.event.client_payload.pr_number }}" != "" ]]; then
|
||||||
# For repository_dispatch (PR builds), use the PR tag
|
# For repository_dispatch (PR builds), use the PR tag
|
||||||
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.client_payload.pr_number }}"
|
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.client_payload.pr_number }}"
|
||||||
UPDATE_TYPE="development"
|
UPDATE_TYPE="development"
|
||||||
|
else
|
||||||
|
# For manual repository_dispatch without PR number, use latest tag
|
||||||
|
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
|
||||||
|
UPDATE_TYPE="manual"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Updating README.md with latest Docker image: $LATEST_TAG"
|
echo "Updating README.md with latest Docker image: $LATEST_TAG"
|
||||||
@@ -161,12 +165,19 @@ jobs:
|
|||||||
All documentation now references the latest stable image.
|
All documentation now references the latest stable image.
|
||||||
|
|
||||||
🤖 Automated by GitHub Actions"
|
🤖 Automated by GitHub Actions"
|
||||||
else
|
elif [[ "$UPDATE_TYPE" == "development" ]]; then
|
||||||
git commit -m "docs: Update Docker image references for PR #${{ github.event.client_payload.pr_number }}
|
git commit -m "docs: Update Docker image references for PR #${{ github.event.client_payload.pr_number }}
|
||||||
|
|
||||||
Automated update after Docker image publish for development build.
|
Automated update after Docker image publish for development build.
|
||||||
Documentation updated to reference the latest development image.
|
Documentation updated to reference the latest development image.
|
||||||
|
|
||||||
|
🤖 Automated by GitHub Actions"
|
||||||
|
else
|
||||||
|
git commit -m "docs: Update Docker image references to latest
|
||||||
|
|
||||||
|
Automated update after manual Docker image build.
|
||||||
|
Documentation updated to reference the latest image.
|
||||||
|
|
||||||
🤖 Automated by GitHub Actions"
|
🤖 Automated by GitHub Actions"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user