From 6d3d4b971339555fbddb7d09ecb259a3c25668ff Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 6 Aug 2023 21:35:10 +0100 Subject: [PATCH] ci: Add "CI" GitHub Actions workflow --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..71aa34389a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI +on: [pull_request, push] + +jobs: + modified_files: + runs-on: ubuntu-latest + outputs: + all: ${{ steps.changes.outputs.modified_files}} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get modified files + id: changes + env: + COMMIT_BEFORE: ${{ github.event_name != 'pull_request' && github.event.pull_request.base.sha || (github.event.before != '0000000000000000000000000000000000000000' && github.event.before || github.event.repository.default_branch) }} + run: | + git fetch --depth=1 origin "$COMMIT_BEFORE" + echo "modified_files=$(git diff --name-only FETCH_HEAD ${{ github.sha }} | xargs)" >> "$GITHUB_OUTPUT" + + docker_image: + uses: ./.github/workflows/docker.yml + permissions: + packages: write + needs: modified_files + if: contains(needs.modified_files.outputs.all, '.github/workflows/docker.yml') || contains(needs.modified_files.outputs.all, 'ci/linux-debian.Dockerfile')