diff --git a/.github/workflows/add-on-simple-tests.yml b/.github/workflows/add-on-simple-tests.yml index 8efb3b2..d924e7e 100644 --- a/.github/workflows/add-on-simple-tests.yml +++ b/.github/workflows/add-on-simple-tests.yml @@ -24,26 +24,18 @@ jobs: runs-on: ubuntu-20.04 env: ADDON_GITHUB_URL: "julienloizelet/ddev-playwright" - ADDON_REF: "v2.1.1" steps: - - name: Clone tested add-on files - uses: actions/checkout@v3 - with: - repository: ${{ env.ADDON_GITHUB_URL }} - ref: ${{ env.ADDON_REF }} - - name: Clone current repository uses: actions/checkout@v3 with: - path: action + path: ../../action - name: Run DDEV test (${{ matrix.ddev_version }}) - uses: ./action/ + uses: "../../action" with: ddev_version: ${{ matrix.ddev_version }} token: ${{ secrets.GITHUB_TOKEN }} - debug_enabled: false - - + addon_repository: ${{ env.ADDON_GITHUB_URL }} + addon_ref: v2.1.1 diff --git a/action.yaml b/action.yaml index 34e4ab9..df8aee5 100644 --- a/action.yaml +++ b/action.yaml @@ -12,7 +12,26 @@ inputs: options: - "stable" - "HEAD" - - + + addon_repository: + description: 'Repository of the tested addon' + required: true + + addon_ref: + description: 'Repository ref of the tested addon' + required: true + + keepalive: + type: boolean + description: 'Keeps GitHub from turning off tests after 60 days' + required: true + default: true + + keepalive_time_elapsed: + description: 'Time elapsed from the previous commit to trigger a new automated commit (in days)' + required: true + default: 55 + debug_enabled: type: boolean description: Debug with tmate @@ -35,6 +54,11 @@ runs: brew install bats-core mkcert mkcert -install + - uses: actions/checkout@v3 + with: + repository: ${{ inputs.addon_repository }} + ref: ${{ inputs.addon_ref }} + - name: Use ddev stable shell: bash if: inputs.ddev_version == 'stable' @@ -62,6 +86,14 @@ runs: shell: bash run: bats tests + # keepalive-workflow adds a dummy commit if there's no other action here, keeps + # GitHub from turning off tests after 60 days + - uses: gautamkrishnar/keepalive-workflow@v1 + if: matrix.ddev_version == 'stable' && inputs.keepalive == 'true' + with: + commit_message: "chore(*): Automated commit to keep the repository active" + time_elapsed: ${{ inputs.keepalive_time_elapsed }} + branding: icon: "code" color: "green"