mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-30 11:27:55 +08:00
fix: attach token when requesting appflowy image/file
This commit is contained in:
15
.github/workflows/web_docker.yml
vendored
15
.github/workflows/web_docker.yml
vendored
@@ -27,6 +27,11 @@ on:
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
test:
|
||||
description: 'If true, append _test to tag and skip latest tag'
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
|
||||
env:
|
||||
LATEST_TAG: latest
|
||||
@@ -65,6 +70,9 @@ jobs:
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
T="${{ github.event.inputs.tag_name }}"
|
||||
if [ "${{ github.event.inputs.test }}" == "true" ]; then
|
||||
T="${T}_test"
|
||||
fi
|
||||
else
|
||||
# Extract tag from ref (e.g., refs/tags/v1.2.3 -> v1.2.3)
|
||||
T="${GITHUB_REF#refs/tags/}"
|
||||
@@ -89,7 +97,7 @@ jobs:
|
||||
cache-to: type=gha,mode=max,scope=appflowy_web-${{ matrix.job.arch }}
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ env.GIT_TAG }}-${{ matrix.job.arch }}
|
||||
${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_latest == 'true') || github.event_name == 'push' && format('{0}:{1}-{2}', env.IMAGE_NAME, env.LATEST_TAG, matrix.job.arch) || '' }}
|
||||
${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_latest == 'true' && github.event.inputs.test != 'true') || (github.event_name == 'push' && format('{0}:{1}-{2}', env.IMAGE_NAME, env.LATEST_TAG, matrix.job.arch)) || '' }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
provenance: false
|
||||
build-args: |
|
||||
@@ -114,6 +122,9 @@ jobs:
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
T="${{ github.event.inputs.tag_name }}"
|
||||
if [ "${{ github.event.inputs.test }}" == "true" ]; then
|
||||
T="${T}_test"
|
||||
fi
|
||||
else
|
||||
# Extract tag from ref (e.g., refs/tags/v1.2.3 -> v1.2.3)
|
||||
T="${GITHUB_REF#refs/tags/}"
|
||||
@@ -129,7 +140,7 @@ jobs:
|
||||
push: true
|
||||
|
||||
- name: Create and push manifest for appflowy_web:latest
|
||||
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_latest == 'true') || github.event_name == 'push' }}
|
||||
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_latest == 'true' && github.event.inputs.test != 'true') || (github.event_name == 'push') }}
|
||||
uses: Noelware/docker-manifest-action@0.4.3
|
||||
with:
|
||||
inputs: ${{ secrets.DOCKER_HUB_USERNAME }}/appflowy_web:${{ env.LATEST_TAG }}
|
||||
|
||||
Reference in New Issue
Block a user