-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (62 loc) · 2.02 KB
/
iperf3.yml
File metadata and controls
70 lines (62 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: 构建镜像:iperf3
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: 构建镜像:iperf3
env:
IMAGE_NAME: iperf3
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Prepare
id: prepare
run: |
version=$(curl -s https://api.github.com/repos/esnet/iperf/tags | jq -r .[].name | grep -m1 -P "^[\d\.]+$")
echo ::set-output name=version::${version}
-
name: Set Up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Set Up Cache
uses: actions/cache@v2
id: buildx-cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx
-
name: Buildx
uses: docker/build-push-action@v3
with:
context: ${{ env.IMAGE_NAME }}
file: ${{ env.IMAGE_NAME }}/Dockerfile
platforms: linux/386,linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x
push: true
build-args: |
ALPINE_VERSION=latest
VERSION=${{ steps.prepare.outputs.version }}
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.prepare.outputs.version }}
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest
-
name: Update DockerHub Description
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKER_PASSWORD }}
with:
destination_container_repo: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
provider: dockerhub
readme_file: ./${{ env.IMAGE_NAME }}/readme.md