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

Bump GitHub action versions. #214

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/auto_assign_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set the author of a PR as the assignee
uses: kentaro-m/auto-assign-action@v1.1.2
uses: kentaro-m/auto-assign-action@v2.0.0
with:
configuration-path: ".github/auto-assignees.yml"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/auto_request_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Request a PR review based on files types/paths, and/or groups the author belongs to
uses: necojackarc/auto-request-review@v0.7.0
uses: necojackarc/auto-request-review@v0.13.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: .github/auto-assignees.yml
7 changes: 3 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ jobs:
steps:

- name: Check out the code
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Make CI
run: make ci

- name: Upload test coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
verbose: true

44 changes: 10 additions & 34 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Main CI

on:
push:
#push:
pull_request:
branches:
- 'main'
- 'release-**'
tags:
- '*'
#tags:
# - '*'

jobs:

Expand All @@ -16,35 +17,23 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

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

# Fix issue of setup-gcloud
- run: |
sudo apt-get install python2.7
export CLOUDSDK_PYTHON="/usr/bin/python2"

- uses: google-github-actions/setup-gcloud@v0
with:
version: '285.0.0'
service_account_key: ${{ secrets.GCS_SA_KEY }}
export_default_credentials: true
- run: gcloud info

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: latest

Expand All @@ -55,14 +44,14 @@ jobs:
run: make test

- name: Upload test coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
verbose: true

# Use the JSON key in secret to login gcr.io
- uses: 'docker/login-action@v2'
- uses: 'docker/login-action@v3'
with:
registry: 'gcr.io' # or REGION.docker.pkg.dev
username: '_json_key'
Expand All @@ -73,17 +62,4 @@ jobs:
if: github.repository == 'vmware-tanzu/velero-plugin-for-gcp'
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
VERSION=$(./hack/docker-push.sh | grep 'VERSION:' | awk -F: '{print $2}' | xargs)

# Upload velero-plugin-for-gcp image package to GCS
source hack/ci/build_util.sh
BIN=velero-plugin-for-gcp
GCS_BUCKET=velero-builds
VELERO_PLUGIN_IMAGE=${BIN}-${VERSION}
VELERO_PLUGIN_IMAGE_FILE=${VELERO_PLUGIN_IMAGE}.tar.gz
VELERO_PLUGIN_IMAGE_BACKUP_FILE=${VELERO_PLUGIN_IMAGE}-'build.'${GITHUB_RUN_NUMBER}.tar.gz

cp ${VELERO_PLUGIN_IMAGE_FILE} ${VELERO_PLUGIN_IMAGE_BACKUP_FILE}

uploader ${VELERO_PLUGIN_IMAGE_FILE} ${GCS_BUCKET}
uploader ${VELERO_PLUGIN_IMAGE_BACKUP_FILE} ${GCS_BUCKET}
./hack/docker-push.sh
Loading