Skip to content

Commit

Permalink
Simplify GitHub Action workflows
Browse files Browse the repository at this point in the history
- Removes unnecessary subdirectories in favor of
defaults
- Also attempts to resolve the `setup-go` caching
warnings.

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
  • Loading branch information
dhaiducek authored and openshift-merge-bot[bot] committed Feb 15, 2024
1 parent 4668813 commit e08ed0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/go-postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ on:
branches:
- main
- release-*
workflow_dispatch: {}

env:
# Common versions
GO_REQUIRED_MIN_VERSION: ''
GOPATH: '/home/runner/work/config-policy-controller/config-policy-controller/go'
defaults:
run:
working-directory: go/src/open-cluster-management.io/config-policy-controller

jobs:
verify:
Expand All @@ -22,13 +13,10 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/config-policy-controller
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go/src/open-cluster-management.io/config-policy-controller/go.mod
go-version-file: go.mod
- name: images
run: make build-images
- name: push
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:

env:
TAG: ${{ github.ref_name }}
defaults:
run:
working-directory: go/src/open-cluster-management.io/config-policy-controller


jobs:
release:
Expand All @@ -18,13 +16,10 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/config-policy-controller
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go/src/open-cluster-management.io/config-policy-controller/go.mod
go-version-file: go.mod
- name: build images
run: |
make build-images
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
defaults:
run:
shell: bash
working-directory: config-policy-controller

jobs:
kind-tests:
Expand All @@ -33,15 +32,11 @@ jobs:
steps:
- name: Checkout Config Policy Controller
uses: actions/checkout@v4
with:
path: config-policy-controller
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Set up Go
uses: actions/setup-go@v5
id: go
with:
go-version-file: config-policy-controller/go.mod
go-version-file: go.mod

- name: Verify modules
run: |
Expand Down

0 comments on commit e08ed0b

Please sign in to comment.