Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Use default GOPATH and workdir for github actions #258

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/go-postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
arch: [ amd64, arm64 ]
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
Expand All @@ -51,7 +51,7 @@ jobs:
needs: [ images ]
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
Expand Down
25 changes: 7 additions & 18 deletions .github/workflows/go-presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,16 @@ env:
# Common versions
GO_VERSION: '1.21'
GO_REQUIRED_MIN_VERSION: ''
GOPATH: '/home/runner/work/addon-framework/addon-framework/go'
defaults:
run:
working-directory: go/src/open-cluster-management.io/addon-framework

jobs:
verify:
name: verify
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand All @@ -38,10 +33,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand All @@ -54,10 +48,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand All @@ -70,10 +63,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand All @@ -86,10 +78,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand All @@ -102,10 +93,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -134,10 +124,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,17 @@ env:
# Common versions
GO_VERSION: '1.21'
GO_REQUIRED_MIN_VERSION: ''
GOPATH: '/home/runner/work/addon-framework/addon-framework/go'
GITHUB_REF: ${{ github.ref }}

defaults:
run:
working-directory: go/src/open-cluster-management.io/addon-framework

jobs:
env:
name: prepare release env
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: get release version
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
Expand All @@ -44,10 +38,9 @@ jobs:
arch: [ amd64, arm64 ]
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: install Go
uses: actions/setup-go@v3
with:
Expand All @@ -71,10 +64,9 @@ jobs:
needs: [ env, images ]
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: create
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin
Expand All @@ -96,10 +88,9 @@ jobs:
needs: [ env, image-manifest ]
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/addon-framework
- name: generate changelog
run: |
echo "# Addon Framework ${{ needs.env.outputs.RELEASE_VERSION }}" > /home/runner/work/changelog.txt
Expand Down
Loading