diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7135646..fe8cb6e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,16 +1,16 @@ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: weekly - day: monday - time: "09:00" - commit-message: - prefix: fix - prefix-development: chore - include: scope - labels: - - gha - - dependencies +- package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + time: "09:00" + commit-message: + prefix: fix + prefix-development: chore + include: scope + labels: + - gha + - dependencies diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index f3ece94..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 120 - -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 14 - -# Issues with these labels will never be considered stale -exemptLabels: - - enhancement - - pinned - - security - -# Label to use when marking an issue as stale -staleLabel: wontfix - -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed in 7 days if no further activity occurs. - If the issue is still valid, please add a respective comment to prevent this - issue from being closed automatically. Thank you for your contributions. - -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b779e2..fe5ce2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,14 +3,16 @@ # SPDX-License-Identifier: MIT # SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/haxe-clink-externs # -# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions name: Build on: + schedule: + - cron: '0 15 1 * *' push: - branches: # build all branches - - '**' - tags-ignore: # but don't build tags + branches-ignore: # build all branches except: + - 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR) + tags-ignore: # don't build tags - '**' paths-ignore: - '**/*.adoc' @@ -18,13 +20,21 @@ on: - '.editorconfig' - '.git*' - '.github/*.yml' + - '.github/workflows/stale.yml' - 'tools' pull_request: + paths-ignore: + - '**/*.adoc' + - '**/*.md' + - '.editorconfig' + - '.git*' + - '.github/*.yml' + - 'tools' workflow_dispatch: # https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ inputs: debug-with-ssh: - description: "Start an SSH session for debugging purposes after tests ran:" + description: "Start an SSH session for debugging purposes at the end of the build:" default: never type: choice options: [ always, on_failure, on_failure_or_cancelled, never ] @@ -37,28 +47,44 @@ on: default: ".*" type: string + defaults: run: shell: bash + jobs: + + ########################################################### build: + ########################################################### runs-on: ${{ matrix.os }} + strategy: fail-fast: false matrix: - os: + os: # https://github.com/actions/runner-images#available-images - windows-latest haxe: - nightly - latest + - 4.3.6 - 4.2.5 + steps: - - name: Show environment variables + - name: "Show: GitHub context" + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo $GITHUB_CONTEXT + + + - name: "Show: environment variables" run: env | sort + - name: Git Checkout - uses: actions/checkout@v4 #https://github.com/actions/checkout + uses: actions/checkout@v4 # https://github.com/actions/checkout + - name: "Install: Clink" run: | @@ -80,6 +106,7 @@ jobs: echo "$(cygpath -w "$HOME/clink")" >> $GITHUB_PATH + - name: "Verify: Clink and Lua" run: | set -eux @@ -93,9 +120,13 @@ jobs: haxe-reusable-workflows-version: dev haxe-version: ${{ matrix.haxe }} - haxe-libs: haxe-doctest no-spoon + haxe-libs: | + haxe-doctest + no-spoon@git:https://github.com/back2dos/no-spoon + - name: "Run Tests" + continue-on-error: ${{ matrix.haxe == 'nightly' }} run: | set -eux haxe tests.hxml @@ -108,7 +139,6 @@ jobs: - name: "SSH session for debugging: check" id: DEBUG_SSH_SESSSION_CHECK if: always() - shell: bash run: | set -eu job_filter_pattern="${{ inputs.debug-with-ssh-only-jobs-matching }}" @@ -117,16 +147,19 @@ jobs: job_info=$(echo "$GITHUB_JOB ${{ runner.os }} haxe-${{ matrix.haxe-version }}" | tr -d '\n') echo "job_info: $job_info" - if [[ "$job_info" =~ .*$job_filter_pattern.* ]] && case "${{ job.status }}" in - success) [[ "${{ inputs.debug-with-ssh }}" == always ]] ;; - cancelled) [[ "${{ inputs.debug-with-ssh }}" == on_failure_or_cancelled ]] ;; - failure) [[ "${{ inputs.debug-with-ssh }}" =~ on_failure.* ]] ;; + when="${{ inputs.debug-with-ssh }}" + + if [[ $when == "always" ]] || [[ "$job_info" =~ .*$job_filter_pattern.* ]] && case "${{ job.status }}" in + success) [[ $when == "always" ]] ;; + cancelled) [[ $when == "on_failure_or_cancelled" ]] ;; + failure) [[ $when == "on_failure"* ]] ;; esac; then - echo "start_session=true" | tee -a "$GITHUB_OUTPUT" + echo "start_ssh_session=true" | tee -a "$GITHUB_OUTPUT" fi + - name: "SSH session for debugging: start" - uses: mxschmitt/action-tmate@v3 # https://github.com/mxschmitt/action-tmate - if: always() && steps.DEBUG_SSH_SESSSION_CHECK.outputs.start_session + uses: mxschmitt/action-tmate@v3 # https://github.com/mxschmitt/action-tmate + if: always() && steps.DEBUG_SSH_SESSSION_CHECK.outputs.start_ssh_session with: limit-access-to-actor: ${{ inputs.debug-with-ssh-only-for-actor }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..c4dd70e --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,54 @@ +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions +name: Stale issues + +on: + schedule: + - cron: '0 15 1,15 * *' + workflow_dispatch: + # https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + + steps: + - name: Git checkout + uses: actions/checkout@v4 # https://github.com/actions/checkout + + - name: Run stale action + uses: actions/stale@v9 # https://github.com/actions/stale + with: + days-before-stale: 90 + days-before-close: 14 + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed in 14 days if no further activity occurs. + If the issue is still valid, please add a respective comment to prevent this + issue from being closed automatically. Thank you for your contributions. + stale-issue-label: stale + close-issue-label: wontfix + exempt-issue-labels: | + enhancement + pinned + security + + - name: Run stale action (for enhancements) + uses: actions/stale@v9 # https://github.com/actions/stale + with: + days-before-stale: 360 + days-before-close: 14 + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed in 14 days if no further activity occurs. + If the issue is still valid, please add a respective comment to prevent this + issue from being closed automatically. Thank you for your contributions. + stale-issue-label: stale + close-issue-label: wontfix + only-labels: enhancement + exempt-issue-labels: | + pinned + security