Skip to content

Commit 6d3d4b9

Browse files
committed
ci: Add "CI" GitHub Actions workflow
1 parent 11d2f5a commit 6d3d4b9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
on: [pull_request, push]
3+
4+
jobs:
5+
modified_files:
6+
runs-on: ubuntu-latest
7+
outputs:
8+
all: ${{ steps.changes.outputs.modified_files}}
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Get modified files
14+
id: changes
15+
env:
16+
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) }}
17+
run: |
18+
git fetch --depth=1 origin "$COMMIT_BEFORE"
19+
echo "modified_files=$(git diff --name-only FETCH_HEAD ${{ github.sha }} | xargs)" >> "$GITHUB_OUTPUT"
20+
21+
docker_image:
22+
uses: ./.github/workflows/docker.yml
23+
permissions:
24+
packages: write
25+
needs: modified_files
26+
if: contains(needs.modified_files.outputs.all, '.github/workflows/docker.yml') || contains(needs.modified_files.outputs.all, 'ci/linux-debian.Dockerfile')

0 commit comments

Comments
 (0)