Skip to content

Commit

Permalink
Update image-sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Feeeenng committed Jun 11, 2024
1 parent 90d7ce0 commit 1f9623e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/image-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,22 @@ jobs:
# new_body=$(echo ${{github.event.issue.body}} | sed 's/\//./g;s/^\s*//;s/\s*$//')
# echo "ISSUSE_BODY=$new_body" >> $GITHUB_ENV

# 解析 JSON 输入
- name: 提取平台信息
- name: parse json
id: extract_platform
run: |
echo '${{ github.event.issue.body }}' | jq -r '.platform' > platform.txt
platform=$(cat platform.txt)
echo "PLATFORM=$platform" >> $GITHUB_ENV
- name: 提取注册表信息
- name: env registries
id: extract_registries
run: |
echo '${{ github.event.issue.body }}' | jq -c '.registries[0]' > registries.txt
registries=$(cat registries.txt)
echo "REGISTRIES=$registries" >> $GITHUB_ENV
- name: 生成镜像同步列表
- name: touch images_list file
run: |
echo '${{ env.REGISTRIES }}' | jq -c 'to_entries[]' | while read item; do
source=$(echo $item | jq -r '.key')
Expand Down

0 comments on commit 1f9623e

Please sign in to comment.