From ee112f068566cdd69da3a9ededbbcc2a986ef23e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 May 2026 19:13:50 +0200 Subject: [PATCH] ci --- .forgejo/workflows/ci.yaml | 16 ++++++++ .github/workflows/ci.yaml | 82 -------------------------------------- 2 files changed, 16 insertions(+), 82 deletions(-) create mode 100644 .forgejo/workflows/ci.yaml delete mode 100644 .github/workflows/ci.yaml diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml new file mode 100644 index 0000000..80e25b0 --- /dev/null +++ b/.forgejo/workflows/ci.yaml @@ -0,0 +1,16 @@ +name: "CI" +on: + pull_request: + push: + +jobs: + checks: + runs-on: nix + steps: + - uses: actions/checkout@v4 + - uses: https://codeberg.org/icewind/attic-action@v1 + with: + name: link + instance: https://cache.icewind.link + authToken: "${{ secrets.ATTIC_TOKEN }}" + - run: nix flake check --keep-going diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 8e685df..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,82 +0,0 @@ -on: [push, pull_request] - -name: Continuous integration - -jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: icewind1991/attic-action@v1 - with: - name: ci - instance: https://cache.icewind.me - authToken: '${{ secrets.ATTIC_TOKEN }}' - - uses: Swatinem/rust-cache@v1 - - uses: lriesebos/nix-develop-command@6f5f4830884d1957767e920c51d6118c9b0ac828 - with: - command: "cargo check" - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: icewind1991/attic-action@v1 - with: - name: ci - instance: https://cache.icewind.me - authToken: '${{ secrets.ATTIC_TOKEN }}' - - uses: Swatinem/rust-cache@v1 - - uses: lriesebos/nix-develop-command@6f5f4830884d1957767e920c51d6118c9b0ac828 - with: - command: "cargo fmt" - - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: icewind1991/attic-action@v1 - with: - name: ci - instance: https://cache.icewind.me - authToken: '${{ secrets.ATTIC_TOKEN }}' - - uses: Swatinem/rust-cache@v1 - - uses: lriesebos/nix-develop-command@6f5f4830884d1957767e920c51d6118c9b0ac828 - with: - command: "cargo clippy -- -D warnings" - - build: - name: Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: icewind1991/attic-action@v1 - with: - name: ci - instance: https://cache.icewind.me - authToken: '${{ secrets.ATTIC_TOKEN }}' - - run: nix build .#${{ matrix.target }} - - docker: - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: icewind1991/attic-action@v1 - with: - name: ci - instance: https://cache.icewind.me - authToken: '${{ secrets.ATTIC_TOKEN }}' - - run: nix build .#dockerImage - - name: Push image - if: github.ref == 'refs/heads/master' - run: | - skopeo copy --dest-creds="${{ secrets.DOCKERHUB_USERNAME }}:${{ secrets.DOCKERHUB_TOKEN }}" "docker-archive:$(nix build .#dockerImage --print-out-paths)" "docker://demostf/backup" \ No newline at end of file