Skip to content

Commit

Permalink
Use the action checked out directly (#69)
Browse files Browse the repository at this point in the history
Checking out a copy of this action with a fixed revision is surprising and makes it difficult to
pin actions properly since the action itself will by default always checkout `v1` again.

One would have to duplicate the revision / version on the use site to be safe.
  • Loading branch information
avdv authored Dec 10, 2024
1 parent a5f090d commit 8a9736c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,18 @@ inputs:
github_token:
description: The Github token to authenticate PR operations.
required: true
checkout_ref:
type: string
default: v1
checkout_path:
type: string
default: .github/actions/gha_join_jobs


runs:
using: composite
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: cgrindel/gha_join_jobs
ref: ${{ inputs.checkout_ref }}
path: ${{ inputs.checkout_path }}

- name: Check Previous Jobs
shell: bash
env:
GHA_JOIN_JOBS_PATH: ${{ inputs.checkout_path }}
GITHUB_TOKEN: ${{ inputs.github_token }}
JOB_NAMES: ${{ inputs.job_names }}
run: |
repo_dir="${PWD}"
cd "${GHA_JOIN_JOBS_PATH}"
cd '${{ github.action_path }}'
bazel_cmd=( bazelisk run //tools:check_jobs -- )
[[ -n "${JOB_NAMES:-}" ]] && bazel_cmd+=( --job_names "${JOB_NAMES}" )
"${bazel_cmd[@]}"

0 comments on commit 8a9736c

Please sign in to comment.