+
Skip to content

Multiarch build. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v2
with:
go-version: ~1.19.3
go-version: ~1.22.2

- uses: actions/cache@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v2
with:
go-version: ~1.19.3
go-version: ~1.22.2

- uses: actions/cache@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v2
with:
go-version: ~1.19.3
go-version: ~1.22.2

- uses: actions/cache@v1
with:
Expand Down
6 changes: 2 additions & 4 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@

set -e

export GO111MODULE="on"
go install github.com/mitchellh/gox@latest
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || echo rev:$(git rev-parse HEAD)` -s -w"
gox -os "linux" -arch "386 amd64" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o init-amd64
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-s -w" -o init-arm64
9 changes: 4 additions & 5 deletions ci/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ set -e

docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker login quay.io -u="$QUAY_USERNAME" -p="$QUAY_PASSWORD"
docker build -t "$GITHUB_REPOSITORY" -t "$GITHUB_REPOSITORY:$1" -t "quay.io/$GITHUB_REPOSITORY" -t "quay.io/$GITHUB_REPOSITORY:$1" .
docker push "$GITHUB_REPOSITORY"
docker push "$GITHUB_REPOSITORY:$1"
docker push "quay.io/$GITHUB_REPOSITORY"
docker push "quay.io/$GITHUB_REPOSITORY:$1"

docker buildx build --platform linux/amd64,linux/arm64 --provenance false --push \
-t $GITHUB_REPOSITORY -t $GITHUB_REPOSITORY:$1 \
-t quay.io/$GITHUB_REPOSITORY -t quay.io/$GITHUB_REPOSITORY:$1
1 change: 0 additions & 1 deletion ci/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

export GO111MODULE="on"
go test -v -race ./...

go install golang.org/x/vuln/cmd/govulncheck@latest
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/aerokube/init

go 1.19
go 1.22.2
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载