diff --git a/.github/workflows/docs-deploy-kubeconfig.yml b/.github/workflows/docs-deploy-kubeconfig.yml index 833016117..5a4ff40c2 100644 --- a/.github/workflows/docs-deploy-kubeconfig.yml +++ b/.github/workflows/docs-deploy-kubeconfig.yml @@ -34,7 +34,6 @@ jobs: with: # list of Docker images to use as base name for tags images: | - ${{ secrets.DOCKER_HUB_NAME }}/fastgpt-docs ghcr.io/${{ github.repository_owner }}/fastgpt-docs registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs tags: | @@ -47,12 +46,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_NAME }} - password: ${{ secrets.DOCKER_HUB_PASSWORD }} - - name: Login to ghcr.io uses: docker/login-action@v3 with: @@ -77,6 +70,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} outputs: tags: ${{ steps.datetime.outputs.datetime }} + update-docs-image: needs: build-fastgpt-docs-images runs-on: ubuntu-20.04 diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 9d635773d..3a11fbda5 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -89,5 +89,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '[👀 Visit Preview](${{ needs.deploy-preview.outputs.url }})' + body: '[👀 Visit preview document](${{ needs.deploy-preview.outputs.url }})' }) diff --git a/.github/workflows/fastgpt-build-image-personal.yml b/.github/workflows/fastgpt-build-image-personal.yml index 8271782bc..c1d0390a5 100644 --- a/.github/workflows/fastgpt-build-image-personal.yml +++ b/.github/workflows/fastgpt-build-image-personal.yml @@ -37,7 +37,7 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secret.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set DOCKER_REPO_TAGGED based on branch or tag run: | echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt:latest" >> $GITHUB_ENV diff --git a/.github/workflows/fastgpt-build-image.yml b/.github/workflows/fastgpt-build-image.yml index 70926860e..26ef9fcf0 100644 --- a/.github/workflows/fastgpt-build-image.yml +++ b/.github/workflows/fastgpt-build-image.yml @@ -44,7 +44,7 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secret.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Ali Hub uses: docker/login-action@v2 with: @@ -131,7 +131,7 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secret.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Ali Hub uses: docker/login-action@v2 with: @@ -219,7 +219,7 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secret.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Ali Hub uses: docker/login-action@v2 with: diff --git a/.github/workflows/fastgpt-preview-image.yml b/.github/workflows/fastgpt-preview-image.yml index adbefade4..e831fdedc 100644 --- a/.github/workflows/fastgpt-preview-image.yml +++ b/.github/workflows/fastgpt-preview-image.yml @@ -1,24 +1,25 @@ name: Preview FastGPT images on: - pull_request: + pull_request_target: workflow_dispatch: jobs: preview-fastgpt-images: permissions: - packages: write contents: read + packages: write attestations: write id-token: write + pull-requests: write + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - submodules: recursive # Fetch submodules fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 with: @@ -30,15 +31,18 @@ jobs: key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- + - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.GH_PAT }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set DOCKER_REPO_TAGGED based on branch or tag run: | echo "DOCKER_REPO_TAGGED=ghcr.io/${{ github.repository_owner }}/fastgpt-pr:${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV + - name: Build image for PR env: DOCKER_REPO_TAGGED: ${{ env.DOCKER_REPO_TAGGED }} @@ -61,5 +65,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Preview Image: ${{ env.DOCKER_REPO_TAGGED }}' + body: 'Preview Image: `${{ env.DOCKER_REPO_TAGGED }}`' })