Skip to content

Commit

Permalink
fix(workflows): Properly use caches in AWS, Azure, GCP, K8s workflows (
Browse files Browse the repository at this point in the history
…#9812)

Short way instead of #9656.
Closes #9388
  • Loading branch information
candiduslynx committed Apr 10, 2023
1 parent 225a796 commit d3c1dc6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/source_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ jobs:
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/aws/go.mod
cache: true
cache-dependency-path: plugins/source/aws/go.sum
cache-key-prefix: test-cache-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down Expand Up @@ -135,11 +136,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/aws/go.mod
cache: true
cache-dependency-path: plugins/source/aws/go.sum
cache-key-prefix: policies-cache-
- name: Build
run: go build .
- name: Setup CloudQuery
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/source_azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ jobs:
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/azure/go.mod
cache: true
cache-dependency-path: plugins/source/azure/go.sum
cache-key-prefix: test-cache-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down Expand Up @@ -97,7 +98,7 @@ jobs:
runs-on: ${{ needs.resolve-runner.outputs.runner }}
defaults:
run:
working-directory: ./plugins/source/aws
working-directory: ./plugins/source/azure
services:
postgres:
image: postgres:11
Expand All @@ -117,11 +118,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/aws/go.mod
go-version-file: plugins/source/azure/go.mod
cache: true
cache-dependency-path: plugins/source/aws/go.sum
cache-dependency-path: plugins/source/azure/go.sum
cache-key-prefix: policies-cache-
- name: Build
run: go build .
- name: Setup CloudQuery
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/source_gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ jobs:
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/gcp/go.mod
cache: true
cache-dependency-path: plugins/source/gcp/go.sum
cache-key-prefix: test-cache-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down Expand Up @@ -117,11 +118,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/gcp/go.mod
cache: true
cache-dependency-path: plugins/source/gcp/go.sum
cache-key-prefix: policies-cache-
- name: Build
run: go build .
- name: Setup CloudQuery
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/source_k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ jobs:
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/k8s/go.mod
cache: true
cache-dependency-path: plugins/source/k8s/go.sum
cache-key-prefix: test-cache-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down Expand Up @@ -117,11 +118,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version-file: plugins/source/k8s/go.mod
cache: true
cache-dependency-path: plugins/source/k8s/go.sum
cache-key-prefix: policies-cache-
- name: Build
run: go build .
- name: Setup CloudQuery
Expand Down

0 comments on commit d3c1dc6

Please sign in to comment.