File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 permissions :
1111 packages : write
1212 contents : read
13-
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ image :
17+ - name : ' ubuntu:18.04'
18+ suffix : ' -ubuntu18.04'
19+ - name : ' ubuntu:20.04'
20+ suffix : ' -ubuntu20.04'
21+ - name : ' ubuntu:22.04'
22+ suffix : ' -ubuntu22.04'
23+ - name : ' ubuntu:latest'
24+ suffix : ' '
1425 steps :
1526 - uses : actions/checkout@v3
1627
3546 uses : docker/build-push-action@v4
3647 with :
3748 push : true
38- build-args :
39- - VERSION=${{ steps.set-version.outputs.VERSION }}
40- tags : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.set-version.outputs.VERSION }}
49+ build-args : |
50+ VERSION=${{ steps.set-version.outputs.VERSION }}
51+ APP_IMAGE=${{ matrix.app_image }}
52+ tags : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.set-version.outputs.VERSION }}${{ matrix.image.suffix }}
Original file line number Diff line number Diff line change 1+ ARG APP_IMAGE=ubuntu:latest
2+
13# Build
24FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS build
35
46ARG VERSION
57ARG BUILD_TIME
68
7- RUN apk update
8- RUN apk add git
9-
109WORKDIR /file.d
1110
1211COPY go.mod go.sum ./
@@ -25,7 +24,7 @@ RUN go build -trimpath \
2524 -o file.d ./cmd/file.d
2625
2726# Deploy
28- FROM ubuntu:20.04
27+ FROM $APP_IMAGE
2928
3029RUN apt update
3130RUN apt install systemd strace tcpdump traceroute telnet iotop curl jq iputils-ping htop -y
You can’t perform that action at this time.
0 commit comments