Skip to content

Commit

Permalink
Automatically building image for linux/arm64 (related to aerokube#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Jun 25, 2022
1 parent cddd7c0 commit 3c49924
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Test
run: ci/test.sh

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Test
run: ci/test.sh

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3

RUN apk add -U ca-certificates tzdata mailcap && rm -Rf /var/cache/apk/*
COPY selenoid /usr/bin
COPY dist/selenoid_linux_$TARGETARCH /usr/bin/selenoid

EXPOSE 4444
ENTRYPOINT ["/usr/bin/selenoid", "-listen", ":4444", "-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video/"]
1 change: 0 additions & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

export GO111MODULE="on"
go install github.com/mitchellh/gox@latest # cross compile
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 || git rev-parse HEAD` -s -w"
gox -os "linux darwin windows" -arch "amd64" -osarch="darwin/arm64" -osarch="darwin/arm64" -osarch="linux/arm64" -osarch="windows/386" -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"
7 changes: 1 addition & 6 deletions ci/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,5 @@

set -e

docker build -t $GITHUB_REPOSITORY .
docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:$1
docker tag $GITHUB_REPOSITORY selenoid/hub:$1
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push $GITHUB_REPOSITORY
docker push $GITHUB_REPOSITORY:$1
docker push selenoid/hub:$1
docker buildx build --push -t "$GITHUB_REPOSITORY" -t "$GITHUB_REPOSITORY:$1" -t "selenoid/hub:$1" --platform linux/amd64,linux/arm64 .

0 comments on commit 3c49924

Please sign in to comment.