Skip to content

Commit d01c4c3

Browse files
committed
build edge docker image
1 parent 27c2fb8 commit d01c4c3

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,3 +695,46 @@ jobs:
695695
fi
696696
697697
echo "Required checks have passed"
698+
699+
build:
700+
if: github.ref == 'refs/heads/main'
701+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
702+
env:
703+
DOCKER_CLI_EXPERIMENTAL: "enabled"
704+
steps:
705+
- name: Checkout
706+
uses: actions/checkout@v3
707+
with:
708+
fetch-depth: 0
709+
710+
- name: Setup Node
711+
uses: ./.github/actions/setup-node
712+
713+
- name: Setup Go
714+
uses: ./.github/actions/setup-go
715+
716+
- name: Setup sqlc
717+
uses: ./.github/actions/setup-sqlc
718+
719+
- name: GHCR Login
720+
uses: docker/login-action@v2
721+
with:
722+
registry: ghcr.io
723+
username: ${{ github.actor }}
724+
password: ${{ secrets.GITHUB_TOKEN }}
725+
726+
- name: Build and push Linux amd64 Docker image
727+
run: |
728+
set -euxo pipefail
729+
go mod download
730+
make gen/mark-fresh
731+
export DOCKER_IMAGE_NO_PREREQUISITES=true
732+
version="$(./scripts/version.sh)"
733+
export CODER_IMAGE_BUILD_BASE_TAG="$(CODER_IMAGE_BASE=coder-base ./scripts/image_tag.sh --version "$version")"
734+
make -j build/coder_linux_amd64
735+
./scripts/build_docker.sh \
736+
--arch amd64 \
737+
--target ghcr.io/coder/coder:latest \
738+
--version $version \
739+
--push \
740+
build/coder_linux_amd64

0 commit comments

Comments
 (0)