diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d0698e513f1..6198fefb02c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -2,9 +2,13 @@ name: Go on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* env: # renovate: datasource=docker depName=docker.io/multiarch/qemu-user-static versioning=regex:^(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$ diff --git a/.github/workflows/codeql-analysis-go.yml b/.github/workflows/codeql-analysis-go.yml index 2ac751af599..a3c4af80039 100644 --- a/.github/workflows/codeql-analysis-go.yml +++ b/.github/workflows/codeql-analysis-go.yml @@ -13,10 +13,13 @@ name: "CodeQL" on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] + branches: + - main + - release-* schedule: - cron: '19 8 * * 1' diff --git a/.github/workflows/codeql-analysis-js.yml b/.github/workflows/codeql-analysis-js.yml index 1b2c0e55c33..aceb8179faa 100644 --- a/.github/workflows/codeql-analysis-js.yml +++ b/.github/workflows/codeql-analysis-js.yml @@ -13,10 +13,13 @@ name: "CodeQL" on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] + branches: + - main + - release-* schedule: - cron: '19 8 * * 1' diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 6d55895ae2e..00379ff3b71 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -2,9 +2,13 @@ name: Container on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* env: # renovate: datasource=go depName=github.com/goreleaser/goreleaser diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 19ce5e6c52f..e72ea71fe8f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,9 +2,13 @@ name: Documents on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* jobs: skip-check: diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index a53b5c53996..f87ff3d7838 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -3,9 +3,13 @@ on: push: tags: - v* - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* env: # renovate: datasource=go depName=github.com/golangci/golangci-lint diff --git a/.github/workflows/jsonnet.yml b/.github/workflows/jsonnet.yml index d7dd87e3fd3..1fe9e75f64e 100644 --- a/.github/workflows/jsonnet.yml +++ b/.github/workflows/jsonnet.yml @@ -2,9 +2,13 @@ name: Jsonnet on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* jobs: skip-check: diff --git a/.github/workflows/proto-push.yaml b/.github/workflows/proto-push.yaml index 1722e1a9f9a..ec61b5fe430 100644 --- a/.github/workflows/proto-push.yaml +++ b/.github/workflows/proto-push.yaml @@ -2,7 +2,9 @@ name: proto-push on: push: - branches: [ main ] + branches: + - main + - release-* jobs: skip-check: diff --git a/.github/workflows/release-dry-run.yml b/.github/workflows/release-dry-run.yml index 920d0a71d3f..32d16c77bc9 100644 --- a/.github/workflows/release-dry-run.yml +++ b/.github/workflows/release-dry-run.yml @@ -2,9 +2,13 @@ name: Release (Dry Run) on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* env: # renovate: datasource=go depName=github.com/goreleaser/goreleaser diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index f4f7e990477..b162cf5d1e7 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -2,9 +2,13 @@ name: UI on: push: - branches: [ main ] + branches: + - main + - release-* pull_request: - branches: [ main ] + branches: + - main + - release-* jobs: skip-check: diff --git a/Dockerfile b/Dockerfile index 0973377b21b..842847bc63d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ RUN mkdir /.cache && touch -t 202101010000.00 /.cache ARG TARGETOS=linux ARG TARGETARCH=amd64 -ARG TARGETVARIANT +ARG TARGETVARIANT=v1 # renovate: datasource=go depName=github.com/grpc-ecosystem/grpc-health-probe ARG GRPC_HEALTH_PROBE_VERSION=v0.4.11 @@ -15,14 +15,16 @@ RUN if [ "$(go env GOHOSTARCH)" != "$(go env GOARCH)" ]; then \ fi WORKDIR /app -COPY ./dist /app/dist +COPY dist dist -RUN if [ "amd64" = "$(go env GOARCH)" ]; then \ - cp "dist/parca_$(go env GOOS)_$(go env GOARCH)_$(go env GOAMD64)/parca" parca; \ +# NOTICE: See goreleaser.yml for the build paths. +RUN if [ "${TARGETARCH}" == 'amd64' ]; then \ + cp "dist/parca_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT:-v1}/parca" . ; \ + elif [ "${TARGETARCH}" == 'arm' ]; then \ + cp "dist/parca_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT##v}/parca" . ; \ else \ - cp "dist/parca_$(go env GOOS)_$(go env GOARCH)/parca" parca; \ + cp "dist/parca_${TARGETOS}_${TARGETARCH}/parca" . ; \ fi - RUN chmod +x parca FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/alpine:3.16.0@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c AS runner