diff options
| author | seth <[email protected]> | 2023-07-02 15:46:53 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-07-02 19:59:45 +0000 |
| commit | 3d05c4bff2b446a3a246b8b802e407b9cc1371c6 (patch) | |
| tree | d12d571b4a918fe673f4c2de2131fb57bbbb5a11 /.github/workflows/ci.yaml | |
| parent | 57783697051e75142268f21a834e62da9d239017 (diff) | |
ci!: start using garnix
Diffstat (limited to '.github/workflows/ci.yaml')
| -rw-r--r-- | .github/workflows/ci.yaml | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index bebf885..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,85 +0,0 @@ -name: ci - -on: - push: - pull_request: - workflow_dispatch: - -permissions: - contents: write - packages: write - -jobs: - lint: - name: lint project - uses: ./.github/workflows/lint.yaml - - format: - name: format project - uses: ./.github/workflows/format.yaml - - build: - runs-on: ubuntu-latest - needs: lint - - strategy: - matrix: - output: [teawiebot, container] - - steps: - - uses: actions/checkout@v3 - - - name: setup nix & cachix - uses: ./.github/actions/setup-nix - with: - cachix-token: ${{ secrets.CACHIX_AUTH_TOKEN }} - - - name: build - run: | - nix build --accept-flake-config -L .#${{ matrix.output }} - - - name: copy docker image - if: ${{ matrix.output == 'container' }} - run: | - readlink result | xargs -I{} cp {} teawiebot.tar.gz - - - name: upload binary - if: ${{ matrix.output == 'teawiebot' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.output }} - path: result/bin/${{ matrix.output }} - - - name: upload docker image - if: ${{ matrix.output == 'container' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.output }} - path: teawiebot.tar.gz - - upload-to-docker: - runs-on: ubuntu-latest - needs: build - if: github.ref == 'refs/heads/main' - - env: - REGISTRY: ghcr.io - - steps: - - name: download docker image - uses: actions/download-artifact@v3 - with: - name: container - - - name: login to ghcr - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: "getchoo" - password: ${{ secrets.GITHUB_TOKEN }} - - - name: upload to ghcr - run: | - docker load < teawiebot.tar.gz - docker tag teawiebot:latest ghcr.io/getchoo/teawiebot:latest - docker push ghcr.io/getchoo/teawiebot:latest |
