From 017bff9520405624fd18928f61173f8bd3b87a44 Mon Sep 17 00:00:00 2001 From: Eyal Birger Date: Thu, 21 Sep 2023 11:12:38 +0300 Subject: [PATCH] NSOF-8035 ci: remove unneeded workflows Avoid unneeded builds on push events. --- .github/workflows/ci-goreleaser.yaml | 67 -------------- .github/workflows/ci.yaml | 26 ------ .github/workflows/release.yaml | 134 --------------------------- 3 files changed, 227 deletions(-) delete mode 100644 .github/workflows/ci-goreleaser.yaml delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml deleted file mode 100644 index a65b81a6..00000000 --- a/.github/workflows/ci-goreleaser.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: Continuous Integration - GoReleaser - -on: - push: - branches: [main] - paths: - - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" - - "distributions/otelcol-contrib/manifest.yaml" - pull_request: - branches: [main] - paths: - - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" - - "distributions/otelcol-contrib/manifest.yaml" - -jobs: - check-goreleaser: - name: Check GoReleaser Configuration - strategy: - matrix: - GOOS: [linux, windows, darwin] - GOARCH: ["386", amd64, arm64, ppc64le, arm] - exclude: - - GOOS: darwin - GOARCH: "386" - - GOOS: windows - GOARCH: arm64 - - GOOS: darwin - GOARCH: arm - - GOOS: windows - GOARCH: arm - runs-on: ubuntu-20.04 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64,ppc64le,linux/arm/v7 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: '~1.21.1' - check-latest: true - - - name: Generate the sources - run: make generate-sources - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser-pro - version: latest - args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split - env: - GOOS: ${{ matrix.GOOS }} - GOARCH: ${{ matrix.GOARCH }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index c5267413..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Continuous Integration - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - name: Build - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: '~1.21.1' - check-latest: true - - - name: Verify - run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 00a9c50a..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,134 +0,0 @@ -name: Release - -on: - push: - tags: ["v*"] - -jobs: - prepare: - strategy: - matrix: - GOOS: [linux, windows, darwin] - GOARCH: ["386", amd64, arm64, ppc64le, arm] - exclude: - - GOOS: darwin - GOARCH: "386" - - GOOS: windows - GOARCH: arm64 - - GOOS: darwin - GOARCH: arm - - GOOS: windows - GOARCH: arm - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: sigstore/cosign-installer@v2 - - - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64,ppc64le,linux/arm/v7 - - - uses: docker/setup-buildx-action@v2 - - - uses: actions/setup-go@v4 - with: - go-version: '~1.21.1' - check-latest: true - - - name: Generate distribution sources - run: make generate-sources - - - name: Log into Docker.io - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - shell: bash - run: | - echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - - - uses: goreleaser/goreleaser-action@v4 - if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit - with: - distribution: goreleaser-pro - version: latest - args: release --clean --split --timeout 2h - env: - GOOS: ${{ matrix.GOOS }} - GOARCH: ${{ matrix.GOARCH }} - GITHUB_TOKEN: ${{ secrets.GH_PAT }} - COSIGN_EXPERIMENTAL: true - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - - uses: actions/upload-artifact@v3 - with: - name: all-artifacts - path: dist/*/* - - release: - name: Release - runs-on: ubuntu-20.04 - needs: prepare - - permissions: - id-token: write - packages: write - contents: write - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: sigstore/cosign-installer@v2 - - - uses: anchore/sbom-action/download-syft@v0.14.3 - - - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64,ppc64le - - - uses: docker/setup-buildx-action@v2 - - - uses: actions/setup-go@v4 - with: - go-version: '~1.21.1' - check-latest: true - - - uses: actions/download-artifact@v3 - with: - name: all-artifacts - path: dist - - - name: Log into Docker.io - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - - name: Login to GitHub Package Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - uses: goreleaser/goreleaser-action@v4 - if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit - with: - distribution: goreleaser-pro - version: latest - args: continue --merge --timeout 2h - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COSIGN_EXPERIMENTAL: true - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}