diff --git a/.github/workflows/auto_assign_prs.yml b/.github/workflows/auto_assign_prs.yml index c7a33da..d827b69 100644 --- a/.github/workflows/auto_assign_prs.yml +++ b/.github/workflows/auto_assign_prs.yml @@ -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 }}" diff --git a/.github/workflows/auto_request_review.yml b/.github/workflows/auto_request_review.yml index 48622d7..83e7032 100644 --- a/.github/workflows/auto_request_review.yml +++ b/.github/workflows/auto_request_review.yml @@ -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 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 003bc14..7314c05 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -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 - diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index aa1a322..8954e25 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,12 +1,13 @@ name: Main CI on: - push: + #push: + pull_request: branches: - 'main' - 'release-**' - tags: - - '*' + #tags: + # - '*' jobs: @@ -16,7 +17,7 @@ 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 @@ -24,27 +25,15 @@ jobs: 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 @@ -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' @@ -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