diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml new file mode 100644 index 0000000..95d74fe --- /dev/null +++ b/.github/actions/checkout/action.yml @@ -0,0 +1,40 @@ +name: Checkout +description: Checkout a Git repository at a particular version +# Based on https://github.com/actions/checkout/blob/main/action.yml + +inputs: + ref: + description: > + The branch, tag or SHA to checkout. When checking out the repository that + triggered a workflow, this defaults to the reference or SHA for that + event. Otherwise, uses the default branch. + required: false + type: string + persist-credentials: + description: Whether to configure the token or SSH key with the local git config + required: false + type: boolean + default: true + fetch-depth: + description: Number of commits to fetch. 0 indicates all history for all branches and tags. + required: false + type: number + default: 1 +outputs: + ref: + description: The branch, tag or SHA that was checked out + value: ${{ steps.checkout.outputs.ref }} + commit: + description: The commit SHA that was checked out + value: ${{ steps.checkout.outputs.commit }} + +runs: + using: "composite" + steps: + - name: Checkout Code + id: checkout + uses: actions/checkout@v7.0.0 + with: + ref: ${{ inputs.ref != '' && inputs.ref || '' }} + persist-credentials: ${{ inputs.persist-credentials }} + fetch-depth: ${{ inputs.fetch-depth }} diff --git a/.github/actions/first-interaction/action.yml b/.github/actions/first-interaction/action.yml new file mode 100644 index 0000000..7f0ddc5 --- /dev/null +++ b/.github/actions/first-interaction/action.yml @@ -0,0 +1,28 @@ +name: First Interaction +description: Greet first-time contributors when they open an issue or PR +# Based on https://github.com/actions/first-interaction/blob/main/action.yml + +inputs: + issue_message: + description: Comment to post on an individual's first issue + required: false + type: string + pr_message: + description: Comment to post on an individual's first pull request + required: false + type: string + repo_token: + description: Token with permissions to post issue and PR comments + required: true + type: string + default: ${{ github.token }} + +runs: + using: "composite" + steps: + - name: First Interaction + uses: actions/first-interaction@v3.1.0 + with: + issue_message: ${{ inputs.issue_message != '' && inputs.issue_message || '' }} + pr_message: ${{ inputs.pr_message != '' && inputs.pr_message || '' }} + repo_token: ${{ inputs.repo_token }} diff --git a/.github/workflows/docker-mod-builder.yml b/.github/workflows/docker-mod-builder.yml index 6601656..2d89d42 100644 --- a/.github/workflows/docker-mod-builder.yml +++ b/.github/workflows/docker-mod-builder.yml @@ -39,13 +39,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Check Out Repo (Commit) - uses: actions/checkout@v7 + uses: actions/checkout@v7.0.0 if: ${{ github.event_name != 'pull_request_target' }} with: persist-credentials: false - name: Check Out Repo (PR) - uses: actions/checkout@v7 + uses: actions/checkout@v7.0.0 if: ${{ github.event_name == 'pull_request_target' }} with: ref: ${{ github.event.pull_request.head.sha }} @@ -70,7 +70,7 @@ jobs: echo "> MULTI_ARCH=${{ inputs.MULTI_ARCH || 'false' }}" >> $GITHUB_STEP_SUMMARY - name: Set up QEMU - uses: docker/setup-qemu-action@v4 + uses: docker/setup-qemu-action@v4.2.0 - name: Build image run: | diff --git a/.github/workflows/init-svc-executable-permissions.yml b/.github/workflows/init-svc-executable-permissions.yml index 4fe50b9..4be2e6a 100644 --- a/.github/workflows/init-svc-executable-permissions.yml +++ b/.github/workflows/init-svc-executable-permissions.yml @@ -6,7 +6,7 @@ jobs: permission_check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.0 with: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false