forked from Mirror/attic-action
Compare commits
1 commit
main
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
3114b1f71e |
6 changed files with 79 additions and 34 deletions
|
@ -1,25 +0,0 @@
|
||||||
name: "Test"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
workflow_call:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-cache:
|
|
||||||
runs-on: nix-flakes
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Attic Cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
endpoint: ${{ vars.ATTIC_ENDPOINT }}
|
|
||||||
cache: ${{ vars.ATTIC_CACHE }}
|
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build Nix Package
|
|
||||||
run: nix-build test.nix
|
|
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
31
.github/workflows/release.yml
vendored
Normal file
31
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.release.tag_name }}
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v3
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: pnpm-lock.yaml
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm install && pnpm build
|
||||||
|
|
||||||
|
- uses: JasonEtco/build-and-tag-action@v2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
41
.github/workflows/test.yml
vendored
Normal file
41
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
name: "Test"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-cache:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v3
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: pnpm-lock.yaml
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm install && pnpm build
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@v13
|
||||||
|
|
||||||
|
- name: Setup Attic Cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||||
|
cache: ${{ secrets.ATTIC_CACHE }}
|
||||||
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build Nix Package
|
||||||
|
run: nix-build test.nix
|
8
dist/index.js
vendored
8
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -36,6 +36,5 @@ export const install = async () => {
|
||||||
|
|
||||||
export const isInstalled = async () => {
|
export const isInstalled = async () => {
|
||||||
let return_code = await exec("attic", ["-V"]);
|
let return_code = await exec("attic", ["-V"]);
|
||||||
core.info(`Attic command returned code ${return_code}`);
|
|
||||||
return return_code === 0;
|
return return_code === 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue