Update test.yml
This commit is contained in:
parent
07e5fcd925
commit
ff6f18f510
|
@ -1,4 +1,4 @@
|
|||
name: TEST---
|
||||
name: PPPPP
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -7,27 +7,29 @@ on:
|
|||
description: 'Comma-separated list of Docker images to pull'
|
||||
required: true
|
||||
default: 'alpine:latest,ubuntu:latest' # 设置默认的 Docker 镜像列表
|
||||
platforms:
|
||||
description: 'Comma-separated list of platforms to package'
|
||||
required: true
|
||||
default: 'amd64,arm64' # 设置默认的平台列表
|
||||
|
||||
jobs:
|
||||
pull_and_package:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [amd64, arm64] # 在这里定义你希望支持的平台列表
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Pull Docker Images
|
||||
- name: Pull Docker Images and Package
|
||||
run: |
|
||||
images="${{ github.event.inputs.docker_images }}"
|
||||
platforms="${{ github.event.inputs.platforms }}"
|
||||
IFS=',' read -r -a image_array <<< "$images"
|
||||
IFS=',' read -r -a platform_array <<< "$platforms"
|
||||
for image in "${image_array[@]}"; do
|
||||
for platform in ${{ matrix.platform }}; do
|
||||
docker pull "${image}-${platform}"
|
||||
docker save "${image}-${platform}" -o "${image//\//_}-${platform}.tar"
|
||||
for platform in "${platform_array[@]}"; do
|
||||
docker pull "${image}:${platform}"
|
||||
docker save "${image}:${platform}" -o "${image//\//_}-${platform}.tar"
|
||||
done
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue