[Feature] Add support for multiple accounts #1284
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| pre-commit: | |
| name: "Pre-commit hooks" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository. | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup nix. | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Use cachix. | |
| uses: cachix/cachix-action@v16 | |
| with: | |
| name: devenv | |
| - name: Install devenv.sh | |
| run: nix profile install nixpkgs#devenv | |
| - name: Run pre-commit hooks. | |
| run: nix develop --no-pure-eval --command pre-commit run --all-files | |
| flatpak_build: | |
| name: Flatpak build | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - pre-commit | |
| steps: | |
| - name: Checkout repository. | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Update apt cache. | |
| run: sudo apt-get update -yq | |
| - name: Install flatpak-builder. | |
| run: sudo apt-get install -yq flatpak-builder flatpak appstream | |
| - name: Show flatpak-builder version. | |
| run: flatpak-builder --version | |
| - name: Install flatpak dependencies. | |
| run: ./scripts/flatpak-deps.sh | |
| - name: Validate manifest. | |
| run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest org.fkoehler.KTailctl.yml | |
| - name: Check external data. | |
| run: flatpak run org.flathub.flatpak-external-data-checker --check-outdated org.fkoehler.KTailctl.yml | |
| - name: Setup go. | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "stable" | |
| - name: Vendor go dependencies. | |
| run: go mod vendor | |
| working-directory: src/wrapper | |
| - name: Build. | |
| run: flatpak-builder --user --force-clean build-dir org.fkoehler.KTailctl.yml | |
| # - name: Validate build. | |
| # run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder builddir build-dir/ | |
| nix_build: | |
| name: Nix build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - pre-commit | |
| steps: | |
| - name: Checkout repository. | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup nix. | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Vendor go dependencies. | |
| run: nix-shell -p go --command "go mod vendor" | |
| working-directory: src/wrapper | |
| - name: Build with nix | |
| run: nix build . | |
| create_release: | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| name: Create release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - flatpak_build | |
| - pre-commit | |
| - nix_build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository. | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup go. | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "stable" | |
| cache-dependency-path: tailwrap/go.sum | |
| - name: Install GH CLI. | |
| run: | | |
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | |
| && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | |
| && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | |
| && sudo apt update \ | |
| && sudo apt install gh -y | |
| - name: Create release. | |
| run: ./scripts/create-release.sh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |