Skip to content

Commit

Permalink
action
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Jan 16, 2025
1 parent aba2e95 commit 34ebc2d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build-pro-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: labring
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
Expand All @@ -50,13 +50,13 @@ jobs:
- name: Set DOCKER_REPO_TAGGED based on branch or tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro:latest" >> $GITHUB_ENV
fi
Expand All @@ -69,7 +69,7 @@ jobs:
-f projects/app/Dockerfile \
--build-arg name=app \
--platform linux/amd64,linux/arm64 \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/fastgpt-pro" \
--label "org.opencontainers.image.source=https://github.com/labring/fastgpt-pro" \
--label "org.opencontainers.image.description=fastgpt-pro image" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: labring
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
Expand All @@ -123,13 +123,13 @@ jobs:
- name: Set image name and tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro-sub-route:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route:latest" >> $GITHUB_ENV
fi
Expand All @@ -142,7 +142,7 @@ jobs:
-f projects/app/Dockerfile \
--platform linux/amd64,linux/arm64 \
--build-arg base_url=/fastaipro \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.source=https://github.com/labring/FastGPT" \
--label "org.opencontainers.image.description=fastgpt-pro image" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: labring
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
Expand All @@ -196,13 +196,13 @@ jobs:
- name: Set image name and tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route-gchat-admin:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro-sub-route-gchat-admin:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route-gchat-admin:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-sub-route-gchat-admin:latest" >> $GITHUB_ENV
fi
Expand All @@ -215,7 +215,7 @@ jobs:
-f projects/app/Dockerfile \
--platform linux/amd64,linux/arm64 \
--build-arg base_url=/gchat-admin \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.source=https://github.com/labring/FastGPT" \
--label "org.opencontainers.image.description=fastgpt-pro-sub-route-gchat-admin image" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-pro-plugin-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: labring
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
Expand All @@ -48,13 +48,13 @@ jobs:
- name: Set DOCKER_REPO_TAGGED based on branch or tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-plugin:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-pro-plugin:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-plugin:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-pro-plugin:latest" >> $GITHUB_ENV
fi
Expand All @@ -67,7 +67,7 @@ jobs:
-f projects/plugin/Dockerfile \
--build-arg name=plugin \
--platform linux/amd64,linux/arm64 \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/fastgpt-pro-plugin" \
--label "org.opencontainers.image.source=https://github.com/labring/fastgpt-pro-plugin" \
--label "org.opencontainers.image.description=fastgpt-pro-plugin image" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-sso-service-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: labring
password: ${{ secrets.GH_PAT }}
- name: Login to Ali Hub
uses: docker/login-action@v2
Expand All @@ -48,13 +48,13 @@ jobs:
- name: Set DOCKER_REPO_TAGGED based on branch or tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
else
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-sso-service:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/${{ github.repository_owner }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Git_Tag=ghcr.io/labring/fastgpt-sso-service:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Git_Latest=ghcr.io/labring/fastgpt-sso-service:latest" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sso-service:${{ github.ref_name }}" >> $GITHUB_ENV
echo "Ali_Latest=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
fi
Expand All @@ -67,7 +67,7 @@ jobs:
-f projects/sso/Dockerfile \
--build-arg name=sso \
--platform linux/amd64,linux/arm64 \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/fastgpt-sso-service" \
--label "org.opencontainers.image.source=https://github.com/labring/fastgpt-sso-service" \
--label "org.opencontainers.image.description=fastgpt-sso-service image" \
--push \
--cache-from=type=local,src=/tmp/.buildx-cache \
Expand Down

0 comments on commit 34ebc2d

Please sign in to comment.