Skip to content

Commit

Permalink
ci: Add "CI" GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Aug 6, 2023
1 parent 11d2f5a commit 6d3d4b9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit 6d3d4b9

Please sign in to comment.