Skip to content

Commit

Permalink
Fix sub-actions' secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
kip93 committed Jun 2, 2022
1 parent 65d1e8e commit 122fefc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/actions/nix/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: "Set up Nix + Cache"
description: ""

inputs:
CACHE_TOKEN:
description: ""
required: true

runs:
using: "composite"
steps:
Expand All @@ -13,7 +18,7 @@ runs:
uses: cachix/cachix-action@v10
with:
name: kip93
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
authToken: "${{ inputs.CACHE_TOKEN }}"
extraPullNames: nix-community
skipPush: true

Expand Down
6 changes: 3 additions & 3 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ runs:
- name: Publish release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.tag.outputs.tag }}
tag_name: ${{ steps.tag.outputs.tag }}
name: "${{ steps.tag.outputs.tag }}"
tag_name: "${{ steps.tag.outputs.tag }}"
body_path: .build/CHANGELOG.md

prerelease: ${{ github.ref != 'refs/heads/main' }}
prerelease: "${{ github.ref != 'refs/heads/main' }}"

files: |
./.build/firmware.hex
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:

- name: "Nix: set up"
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "Nix: format"
run: |
Expand All @@ -41,6 +43,8 @@ jobs:

- name: "Nix: set up"
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "Nix: lint"
run: |
Expand All @@ -58,6 +62,8 @@ jobs:

- name: "Nix: set up"
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "Nix: shellcheck"
run: |
Expand All @@ -75,6 +81,8 @@ jobs:

- name: "Nix: set up"
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "Nix: vulnerabilities"
run: |
Expand All @@ -93,6 +101,8 @@ jobs:

- name: "Nix: set up"
uses: ./repo/.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "Nix: logic"
working-directory: ./repo
Expand All @@ -112,6 +122,8 @@ jobs:

- name: "Nix: set up"
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "QMK: format"
run: |
Expand All @@ -129,6 +141,8 @@ jobs:

- name: "Nix: set up"
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "QMK: lint"
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:

- name: Set up Nix
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Compile
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

- name: Set up
uses: ./.github/actions/nix
with:
CACHE_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Update QMK
run: |
Expand Down

0 comments on commit 122fefc

Please sign in to comment.