Skip to content

How to upgrade from 0.3.1 to 0.4.2? #83

@chingor13

Description

@chingor13

TL;DR

Getting an error when trying to update from 0.3.1 to 0.4.2. I tried adding a token_format: access_token to the action inputs but the file is not created.

Error reading credential file from environment variable GOOGLE_APPLICATION_CREDENTIALS, value '/home/runner/work/java-trace/java-trace/ba071349bd11a1aa46511d5c': File does not exist.

https://github.com/googleapis/java-trace/runs/4476013621?check_suite_focus=true

Expected behavior

The file is created at the file path set in GOOGLE_APPLICATION_CREDENTIALS

Observed behavior

No file exists at the path set in GOOGLE_APPLICATION_CREDENTIALS

Action YAML

name: integration
on:
  push:
    branches:
    - main
  pull_request:
  pull_request_target:
    types: [labeled]
jobs:
  test:
    if: ${{ github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' }}
    runs-on: ubuntu-latest
    permissions:
      contents: 'write'
      pull-requests: 'write'
      id-token: 'write'
    steps:
    - uses: 'google-github-actions/auth@v0.4.2'
      with:
        workload_identity_provider: 'projects/1016721519174/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
        service_account: 'it-service-account@gcloud-devel.iam.gserviceaccount.com'
        create_credentials_file: 'true'
        access_token_lifetime: 300s
        token_format: 'access_token'
    - uses: actions/checkout@v2
      with:
        ref: ${{github.event.pull_request.head.ref}}
        repository: ${{github.event.pull_request.head.repo.full_name}}
    - uses: actions/setup-java@v2
      with:
        distribution: zulu
        java-version: 8
    - run: java -version
    - run: .kokoro/build.sh
      env:
        JOB_TYPE: integration
        GOOGLE_CLOUD_PROJECT: gcloud-devel
    - if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
      uses: actions/github-script@v5
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        script: |
          try {
            await github.rest.issues.removeLabel({
              name: 'actions:force-run',
              owner: 'googleapis',
              repo: 'java-trace',
              issue_number: context.payload.pull_request.number
            });
          } catch (e) {
            if (!e.message.includes('Label does not exist')) {
              throw e;
            }
          }
    - if: ${{ github.event_name == 'schedule'}}
      run: |
        curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
        chmod +x ./flakybot
        ./flakybot --repo googleapis/java-trace --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions