From 99b1cd46b3799cc280947037a61a31cb744e82be Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Mon, 14 Oct 2024 13:23:54 -0400 Subject: [PATCH] ci: simplify ci, bump version, fix pr linter (#713) Signed-off-by: Michael Beemer --- .github/workflows/e2e.yml | 2 +- .github/workflows/pr-checks.yml | 21 +++++++++------------ .github/workflows/pr-lint.yml | 1 + 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 036165de8..b23fd55c0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Download image - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: open-feature-operator-local-${{ github.sha }} path: ${{ github.workspace }} diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 2616f47af..23f25c225 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -9,9 +9,6 @@ on: pull_request: paths-ignore: - '**.md' -env: - # Default minimum version of Go to support. - DEFAULT_GO_VERSION: "~1.21" permissions: contents: read @@ -21,10 +18,13 @@ jobs: name: Unit Tests runs-on: ubuntu-22.04 steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Go uses: actions/setup-go@v5 with: - go-version: ${{ env.DEFAULT_GO_VERSION }} + go-version-file: 'go.mod' - name: Setup Environment run: | @@ -39,9 +39,6 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - - name: Checkout repository - uses: actions/checkout@v4 - - name: Workspace Init run: make workspace-init @@ -62,12 +59,12 @@ jobs: uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@master + uses: docker/setup-qemu-action@v3 with: platforms: all - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@master + uses: docker/setup-buildx-action@v3 - name: Build uses: docker/build-push-action@v4 with: @@ -78,9 +75,9 @@ jobs: cache-from: type=gha,scope=${{ github.ref_name }}-ofo cache-to: type=gha,scope=${{ github.ref_name }}-ofo - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master + uses: aquasecurity/trivy-action@0.27.0 with: - input: /github/workspace/open-feature-operator-local.tar + input: ${{ github.workspace }}/open-feature-operator-local.tar format: "template" template: "@/contrib/sarif.tpl" output: "trivy-results.sarif" @@ -90,7 +87,7 @@ jobs: with: sarif_file: "trivy-results.sarif" - name: Upload image as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: open-feature-operator-local-${{ github.sha }} path: ${{ github.workspace }}/open-feature-operator-local.tar diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 1d532ea33..e701cfa10 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -21,6 +21,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: amannn/action-semantic-pull-request@v5 + id: lint_pr_title env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}