diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 88cdb17..0276ea3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,12 +1,14 @@ name: Main CI on: - push: + # This change is for debug. + #push: + pull_request: branches: - 'main' - 'release-**' - tags: - - '*' + #tags: + # - '*' jobs: @@ -16,35 +18,37 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: '1.22.8' - id: go + go-version-file: 'go.mod' - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Fix issue of setup-gcloud - run: | - sudo apt-get install python2.7 - export CLOUDSDK_PYTHON="/usr/bin/python2" + sudo apt-get install python3 + export CLOUDSDK_PYTHON="/usr/bin/python3" - - uses: google-github-actions/setup-gcloud@v0 + - id: 'auth' + uses: google-github-actions/auth@v2 with: - version: '285.0.0' - service_account_key: ${{ secrets.GCS_SA_KEY }} - export_default_credentials: true + credentials_json: '${{ secrets.GCS_SA_KEY }}' + + - name: 'set up GCloud SDK' + uses: google-github-actions/setup-gcloud@v2 + - 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 +59,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'