File tree Expand file tree Collapse file tree 5 files changed +57
-13
lines changed
Expand file tree Collapse file tree 5 files changed +57
-13
lines changed Original file line number Diff line number Diff line change 1+ name : Build docker image
2+ on :
3+ push :
4+ tags :
5+ - v*
6+ env :
7+ REGISTRY : ghcr.io
8+ IMAGE_NAME : flatcar-linux/ct
9+
10+ jobs :
11+ docker :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ packages : write
16+ steps :
17+
18+ - name : Get tag name
19+ id : meta
20+ uses : docker/metadata-action@v3
21+ with :
22+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
23+
24+ - name : Checkout repository
25+ uses : actions/checkout@v2
26+
27+ - name : Setup QEMU
28+ uses : docker/setup-qemu-action@v1
29+ with :
30+ platforms : all
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v1
34+
35+ - name : Login to registry
36+ uses : docker/login-action@v1
37+ with :
38+ registry : ${{ env.REGISTRY }}
39+ username : ${{ github.actor }}
40+ password : ${{ secrets.GITHUB_TOKEN }}
41+
42+ - name : Build and push
43+ uses : docker/build-push-action@v2
44+ with :
45+ context : .
46+ push : true
47+ platforms : linux/amd64,linux/arm64/v8
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 55RUN apk update && apk add --virtual .build-deps bash git make \
66 && make \
77 && mv bin/ct /usr/bin/ \
8- && mv Dockerfile.build-alpine /tmp \
98 && rm -rf $GOPATH \
109 && apk del .build-deps && rm -rf /var/cache/apk
11- WORKDIR /tmp
12- ENTRYPOINT ["/usr/bin/ct" ]
10+
11+ FROM scratch
12+ COPY --from=0 /usr/bin/ct /ct
13+ ENTRYPOINT ["/ct" ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33set -e
44VERSION=$( git describe)
5- docker build -t $VERSION .
6- docker run --rm --entrypoint tar $VERSION -c /usr/bin/ct Dockerfile.build-alpine \
7- | docker build -f Dockerfile.build-alpine --tag quay.io/coreos/ct:$VERSION -
8- docker tag quay.io/coreos/ct:$VERSION quay.io/coreos/ct:latest-dev
5+ docker build --tag ghcr.io/flatcar-linux/ct:$VERSION .
6+ docker tag ghcr.io/flatcar-linux/ct:$VERSION ghcr.io/flatcar-linux/ct:latest-dev
Original file line number Diff line number Diff line change 22
33set -e
44VERSION=$( git describe)
5- docker login -u=" $DOCKER_USERNAME " -p=" $DOCKER_PASSWORD " quay.io
6- docker push quay.io/coreos/ct:$VERSION
7- docker push quay.io/coreos/ct:latest-dev
5+ docker push ghcr.io/flatcar-linux/ct:$VERSION
6+ docker push ghcr.io/flatcar-linux/ct:latest-dev
You can’t perform that action at this time.
0 commit comments