diff --git a/.github/actions/nix-shell/action.yml b/.github/actions/nix-shell/action.yml deleted file mode 100644 index 34c63cc..0000000 --- a/.github/actions/nix-shell/action.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: "Prepare nix-shell" -description: - Download cache, build nix-shell and potentially upload any new - derivations to cache - -inputs: - cachix_auth_token: - required: true - -runs: - using: "composite" - steps: - - uses: cachix/install-nix-action@v22 - with: - nix_path: nixpkgs=./nix/default.nix - - - uses: cachix/cachix-action@v12 - with: - name: niteo-public - authToken: '${{ inputs.cachix_auth_token }}' - - - name: Build nix-shell - shell: bash - run: nix-shell --run "echo 'nix-shell successfully entered'" diff --git a/.github/actions/uncommitted-changes/action.yml b/.github/actions/uncommitted-changes/action.yml deleted file mode 100644 index b96b0c0..0000000 --- a/.github/actions/uncommitted-changes/action.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Uncommitted Changes" -description: - Fail if any uncommitted changes are detected. - -runs: - using: "composite" - steps: - - uses: tj-actions/verify-changed-files@v14 - id: verify-changed-files - - - name: List all changed files tracked and untracked files - if: steps.verify-changed-files.outputs.files_changed == 'true' - shell: bash - run: | - echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}" - exit 1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 959848f..3c34761 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/nix-shell + - uses: teamniteo/gha-actions/nix@v2 with: - cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN_PUBLIC }}' + cache: niteo-public + auth_token: '${{ secrets.CACHIX_AUTH_TOKEN_PUBLIC }}' - run: nix-shell --run "make lint all=true" @@ -40,7 +41,7 @@ jobs: - run: nix-shell --run "make dist" - - uses: ./.github/actions/uncommitted-changes + - uses: teamniteo/gha-actions/uncommitted-changes@v2 # yamllint disable diff --git a/.github/workflows/nix-gh-cache.yml b/.github/workflows/nix-gh-cache.yml deleted file mode 100644 index aa55051..0000000 --- a/.github/workflows/nix-gh-cache.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Build derivations for Linux and Apple Silicon and upload them to -# Cachix - -name: Nix Cache - -on: - push: - paths: - - "**.nix" - - "**.lock" - - "**package.json" - - "**pyproject.toml" - - ".github/**.ya?ml" - workflow_dispatch: - -# Kill running jobs if a new commit is pushed to PR, or someone restarts -# a job that is already running. -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - - prime: - name: Prime Cachix - - strategy: - # Keep building other OSes even if one fails - fail-fast: false - matrix: - # ubuntu-latest-16-cores: Hosted GHA Linux runner, larger than default - # so that this job primes the cache as much as possible before - # other jobs that depend on the cache start running - # macos-latest: Hosted GHA Intel-based MAC runner - # macos-m1: TODO, GitHub says they will be available in Q4 - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/nix-shell - with: - cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN_PUBLIC }}'