Skip to content

Commit

Permalink
upgrade checkout action tool version to v4
Browse files Browse the repository at this point in the history
Signed-off-by: zhujian <[email protected]>
  • Loading branch information
zhujian7 committed Mar 6, 2024
1 parent 12e4594 commit 66031f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go-postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
GO_VERSION: '1.21'
GO_REQUIRED_MIN_VERSION: ''
GOPATH: '/home/runner/work/managed-serviceaccount/managed-serviceaccount/go'

defaults:
run:
working-directory: go/src/open-cluster-management.io/managed-serviceaccount
Expand All @@ -25,7 +26,7 @@ jobs:
arch: [ amd64, arm64 ]
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount
Expand All @@ -52,7 +53,7 @@ jobs:
needs: [ images ]
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go-presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v2
with:
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v2
with:
Expand All @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v2
with:
Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v2
with:
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ env:
# Common versions
GO_VERSION: '1.21'
GO_REQUIRED_MIN_VERSION: ''
GOPATH: '/home/runner/work/managed-serviceaccount/managed-serviceaccount/go'
GITHUB_REF: ${{ github.ref }}
CHART_NAME: managed-serviceaccount
CHART_VERSION_FILE_PATH: ./charts/managed-serviceaccount/Chart.yaml

defaults:
run:
working-directory: go/src/open-cluster-management.io/managed-serviceaccount

jobs:
env:
name: prepare release env
Expand All @@ -26,7 +21,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount
- name: get release version
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
Expand All @@ -50,7 +44,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount
- name: install Go
uses: actions/setup-go@v2
with:
Expand All @@ -77,7 +70,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount
- name: create
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin
Expand All @@ -102,7 +94,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount
- name: setup helm
uses: azure/setup-helm@v1
- name: chart package
Expand Down Expand Up @@ -155,7 +146,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/managed-serviceaccount

- name: calculate next version
id: calculate_next_version
Expand All @@ -177,9 +167,10 @@ jobs:
run: |
gh pr list --state open > pr_list.txt
cat pr_list.txt
PR_EXIST=$(grep "Update chart version to ${{ steps.calculate_next_version.outputs.next_version }}" pr_list.txt && echo true || echo false)
PR_EXIST=$(grep -q "Update chart version to ${{ steps.calculate_next_version.outputs.next_version }}" pr_list.txt && echo true || echo false)
echo "pr_exists=$PR_EXIST" >> $GITHUB_OUTPUT
echo "Pull request for version ${{ steps.calculate_next_version.outputs.next_version }} exists: $PR_EXIST"
rm -rf pr_list.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -199,9 +190,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
Update chart version to ${{ steps.calculate_next_version.outputs.next_version }}
Signed-off-by: "$GITHUB_ACTOR" "[email protected]"
title: "Update chart version to ${{ steps.calculate_next_version.outputs.next_version }}"
title: ":seedling: Update chart version to ${{ steps.calculate_next_version.outputs.next_version }}"
body: "Automatically updating chart version to ${{ steps.calculate_next_version.outputs.next_version }}"
branch: update-chart-version-${{ steps.calculate_next_version.outputs.next_version }}
signoff: true
Expand Down

0 comments on commit 66031f3

Please sign in to comment.