Skip to content

Commit c60c75c

Browse files
authored
ci: do not rebuild but use artifacts from the build job (#11180)
1 parent f2a9115 commit c60c75c

File tree

1 file changed

+13
-40
lines changed

1 file changed

+13
-40
lines changed

.github/workflows/ci.yaml

+13-40
Original file line numberDiff line numberDiff line change
@@ -835,22 +835,14 @@ jobs:
835835
TOKEN_SAO_PAULO: ${{ secrets.FLY_SAO_PAULO_CODER_PROXY_SESSION_TOKEN }}
836836

837837
deploy-legacy-proxies:
838-
name: "deploy-legacy-proxies"
839-
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-16vcpu-ubuntu-2204' || 'ubuntu-latest' }}
838+
runs-on: ubuntu-latest
840839
timeout-minutes: 30
841-
needs: changes
842-
if: |
843-
github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
844-
&& needs.changes.outputs.docs-only == 'false'
840+
needs: build
841+
if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
845842
permissions:
846843
contents: read
847844
id-token: write
848845
steps:
849-
- name: Checkout
850-
uses: actions/checkout@v4
851-
with:
852-
fetch-depth: 0
853-
854846
- name: Authenticate to Google Cloud
855847
uses: google-github-actions/auth@v2
856848
with:
@@ -860,30 +852,11 @@ jobs:
860852
- name: Set up Google Cloud SDK
861853
uses: google-github-actions/setup-gcloud@v2
862854

863-
- name: Setup Node
864-
uses: ./.github/actions/setup-node
865-
866-
- name: Setup Go
867-
uses: ./.github/actions/setup-go
868-
869-
- name: Install goimports
870-
run: go install golang.org/x/tools/cmd/goimports@latest
871-
- name: Install nfpm
872-
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.16.0
873-
874-
- name: Install zstd
875-
run: sudo apt-get install -y zstd
876-
877-
- name: Build Release
878-
run: |
879-
set -euo pipefail
880-
go mod download
881-
882-
version="$(./scripts/version.sh)"
883-
make gen/mark-fresh
884-
make -j \
885-
build/coder_"$version"_windows_amd64.zip \
886-
build/coder_"$version"_linux_amd64.{tar.gz,deb}
855+
- name: Download build artifacts
856+
uses: actions/download-artifact@v3
857+
with:
858+
name: coder
859+
path: ./build
887860

888861
- name: Install Release
889862
run: |
@@ -896,11 +869,11 @@ jobs:
896869
"southamerica-east1-b coder-brazil coder-workspace-proxy"
897870
)
898871
899-
deb_pkg="./build/coder_$(./scripts/version.sh)_linux_amd64.deb"
900-
if [ ! -f "$deb_pkg" ]; then
901-
echo "deb package not found: $deb_pkg"
902-
ls -l ./build
903-
exit 1
872+
deb_pkg=$(find ./build -name "coder_*_linux_amd64.deb" -print -quit)
873+
if [ -z "$deb_pkg" ]; then
874+
echo "deb package $deb_pkg not found"
875+
ls -l ./build
876+
exit 1
904877
fi
905878
906879
gcloud config set project coder-dogfood

0 commit comments

Comments
 (0)