From 23ab82838ca279c7bd76afb81f3ca50f4194f9f7 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 28 Apr 2024 22:54:04 +0200 Subject: [PATCH] Split tasks into separate workflows --- .forgejo/workflows/atticd.yaml | 22 +++++++++ .forgejo/workflows/blog-pim.yaml | 21 +++++++++ .forgejo/workflows/cache.yaml | 53 ---------------------- .forgejo/workflows/forgejo-nix-action.yaml | 21 +++++++++ 4 files changed, 64 insertions(+), 53 deletions(-) create mode 100644 .forgejo/workflows/atticd.yaml create mode 100644 .forgejo/workflows/blog-pim.yaml delete mode 100644 .forgejo/workflows/cache.yaml create mode 100644 .forgejo/workflows/forgejo-nix-action.yaml diff --git a/.forgejo/workflows/atticd.yaml b/.forgejo/workflows/atticd.yaml new file mode 100644 index 0000000..483f913 --- /dev/null +++ b/.forgejo/workflows/atticd.yaml @@ -0,0 +1,22 @@ + +on: [ push ] +jobs: + atticd: + runs-on: docker + container: + image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962 + steps: + - name: Clone repository + run: git clone https://git.kun.is/home/container-images.git checkout + - name: Setup Nix cache + run: | + /bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }} + /bin/attic use home + - name: Build Atticd + run: nix build --out-link atticd ./checkout#packages.x86_64-linux.atticd + - name: Push atticd to Nix cache + run: /bin/attic push home atticd + - name: Log into container registry + run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is + - name: Push atticd to container registry + run: /bin/skopeo --insecure-policy copy docker-archive:./atticd docker://git.kun.is/home/atticd:latest diff --git a/.forgejo/workflows/blog-pim.yaml b/.forgejo/workflows/blog-pim.yaml new file mode 100644 index 0000000..842423f --- /dev/null +++ b/.forgejo/workflows/blog-pim.yaml @@ -0,0 +1,21 @@ +on: [ push ] +jobs: + blog-pim: + runs-on: docker + container: + image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962 + steps: + - name: Clone repository + run: git clone https://git.kun.is/home/container-images.git checkout + - name: Setup Nix cache + run: | + /bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }} + /bin/attic use home + - name: Build blog-pim + run: nix build --out-link blog-pim ./checkout#packages.x86_64-linux.blog-pim + - name: Push blog-pim to Nix cache + run: /bin/attic push home blog-pim + - name: Log into container registry + run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is + - name: Push blog-pim to container registry + run: /bin/skopeo --insecure-policy copy docker-archive:./blog-pim docker://git.kun.is/home/forgejo-nix-action:latest diff --git a/.forgejo/workflows/cache.yaml b/.forgejo/workflows/cache.yaml deleted file mode 100644 index 41e8f3b..0000000 --- a/.forgejo/workflows/cache.yaml +++ /dev/null @@ -1,53 +0,0 @@ -on: [ push ] -jobs: - blog-pim: - runs-on: docker - container: - image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962 - steps: - - name: Clone repository - run: git clone https://git.kun.is/home/container-images.git checkout - - name: Setup Nix cache - run: | - /bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }} - /bin/attic use home - - name: Build blog-pim - run: nix build --out-link blog-pim ./checkout#packages.x86_64-linux.blog-pim - - name: Push blog-pim to Nix cache - run: /bin/attic push home blog-pim - - name: Log into container registry - run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is - - name: Push blog-pim to container registry - run: /bin/skopeo --insecure-policy copy docker-archive:./blog-pim docker://git.kun.is/home/forgejo-nix-action:latest - atticd: - runs-on: docker - container: - image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962 - steps: - - name: Clone repository - run: git clone https://git.kun.is/home/container-images.git checkout - - name: Setup Nix cache - run: | - /bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }} - /bin/attic use home - - name: Build Atticd - run: nix build --out-link atticd ./checkout#packages.x86_64-linux.atticd - - name: Push atticd to Nix cache - run: /bin/attic push home atticd - - name: Log into container registry - run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is - - name: Push atticd to container registry - run: /bin/skopeo --insecure-policy copy docker-archive:./atticd docker://git.kun.is/home/atticd:latest - forgejo-nix-action: - runs-on: docker - container: - image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962 - steps: - - name: Build forgejo-nix-action - run: nix build --out-link forgejo-nix-action ./checkout#packages.x86_64-linux.forgejo-nix-action - - name: Push forgjeo-nix-action to Nix cache - run: /bin/attic push home forgejo-nix-action - - name: Log into container registry - run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is - - name: Push forgejo-nix-action to container registry - run: /bin/skopeo --insecure-policy copy docker-archive:./forgejo-nix-action docker://git.kun.is/home/forgejo-nix-action:latest diff --git a/.forgejo/workflows/forgejo-nix-action.yaml b/.forgejo/workflows/forgejo-nix-action.yaml new file mode 100644 index 0000000..796767d --- /dev/null +++ b/.forgejo/workflows/forgejo-nix-action.yaml @@ -0,0 +1,21 @@ +on: [ push ] +jobs: + forgejo-nix-action: + runs-on: docker + container: + image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962 + steps: + - name: Clone repository + run: git clone https://git.kun.is/home/container-images.git checkout + - name: Setup Nix cache + run: | + /bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }} + /bin/attic use home + - name: Build forgejo-nix-action + run: nix build --out-link forgejo-nix-action ./checkout#packages.x86_64-linux.forgejo-nix-action + - name: Push forgjeo-nix-action to Nix cache + run: /bin/attic push home forgejo-nix-action + - name: Log into container registry + run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is + - name: Push forgejo-nix-action to container registry + run: /bin/skopeo --insecure-policy copy docker-archive:./forgejo-nix-action docker://git.kun.is/home/forgejo-nix-action:latest