diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1359463..0fb762e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,30 +13,6 @@ on: jobs: checks: - runs-on: ubuntu-24.04 - container: - image: fedora:43 # CURRENT DEVELOPMENT ENVIRONMENT - steps: - - name: Install dependencies for Fedora - run: dnf install -y make yamllint - - uses: actions/checkout@v4 - - name: Run yamllint check - run: make yamllint - - rust_dependent_checks: - runs-on: ubuntu-latest - container: fedora:43 # CURRENT DEVELOPMENT ENVIRONMENT - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - name: Install dependencies - run: dnf install -y clang curl make - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: cargo - - uses: baptiste0928/cargo-install@v3 - with: - crate: typos-cli - - name: Run test - run: make -f Makefile check-typos + uses: $/.github/workflows/reusable_general.yml + with: + fedora-container-image-number: 43 # CURRENT DEVELOPMENT ENVIRONMENT diff --git a/.github/workflows/reusable_general.yml b/.github/workflows/reusable_general.yml new file mode 100644 index 0000000..741c3f6 --- /dev/null +++ b/.github/workflows/reusable_general.yml @@ -0,0 +1,32 @@ +--- +name: Reusable Checks that are repo-language agnostic + +on: + workflow_call: + inputs: + fedora-container-image-number: + description: "Fedora Container Image Number" + required: true + type: number + +jobs: + general_checks: + runs-on: ubuntu-latest + container: fedora:${{ inputs.fedora-container-image-number }} + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - name: Install dependencies + run: dnf install -y clang curl make yamllint + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: cargo + toolchain: stable + - uses: baptiste0928/cargo-install@v3 + with: + crate: typos-cli + - name: Run typos check + run: make -f Makefile check-typos + - name: Run yamllint check + run: make -f Makefile yamllint