From 3edf00ee91fec30830239382ad68c2e3463a2a87 Mon Sep 17 00:00:00 2001 From: Sam Smith Date: Tue, 27 Sep 2022 18:35:02 -0400 Subject: [PATCH] Adding self testing workflow --- .github/workflows/workflow.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b7bddad..7217b91 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -30,19 +30,27 @@ jobs: echo "Version: ${{ steps.gitversion.outputs.SemVer }}" echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" + # checkout the code from this branch, and then test the action from here + test: + runs-on: ubuntu-latest + steps: + - name: checkout the code from this branch + uses: actions/checkout@v3 + with: + ref: ${{ github.ref }} - name: Test this repo - uses: samsmithnz/lead-time-for-changes@main + uses: ./ # the ./ runs the action.yml in this repo with: workflows: 'CI' - name: Test elite repo with PAT Token, using last commit method (no dev time) - uses: samsmithnz/lead-time-for-changes@main + uses: ./ with: workflows: 'Feature Flags CI/CD' owner-repo: 'samsmithnz/SamsFeatureFlags' commit-counting-method: 'last' pat-token: "${{ secrets.PATTOKEN }}" - name: Test elite repo with PAT Token, using first commit method (including dev time) - uses: samsmithnz/lead-time-for-changes@main + uses: ./ with: workflows: 'Feature Flags CI/CD' owner-repo: 'samsmithnz/SamsFeatureFlags' @@ -53,6 +61,7 @@ jobs: runs-on: ubuntu-latest needs: - build + - test if: github.ref == 'refs/heads/main' steps: - name: Display GitVersion outputs