diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94b3a8953..d4020f083 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,10 +49,10 @@ jobs: - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ steps.release-step.outputs.version }} + tag: "v${{ steps.release-step.outputs.version }}" run: | gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ - --title="${{ steps.release-step.outputs.version }}" \ + --title="v${{ steps.release-step.outputs.version }}" \ --target="release/${{ steps.release-step.outputs.version }}" \ --generate-notes diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index ae1ecf85f..cf2156466 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -1,12 +1,10 @@ name: Tests on: push: - paths: - - 'keep/**' pull_request: - paths: - - 'keep/**' workflow_dispatch: +permissions: + actions: write concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true @@ -19,9 +17,24 @@ env: ELASTIC_PASSWORD: keeptests jobs: + check-before-unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Check if relevant files have changed + id: file_check + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if ! git diff --name-only $BASE_SHA $HEAD_SHA | grep -q '^keep/'; then + echo "No relevant changes, cancelling job." + exit 78 + fi tests: runs-on: ubuntu-latest - + needs: + - check-before-unit-tests services: mysql: image: mysql:5.7