Generalize Forgejo workflows
Some checks failed
/ atticd (push) Failing after 7s
/ blog-pim (push) Failing after 7s
/ forgejo-nix-action (push) Failing after 7s

This commit is contained in:
Pim Kunis 2024-04-28 23:26:06 +02:00
parent c6ee065273
commit d627220fed
3 changed files with 36 additions and 36 deletions

View file

@ -7,19 +7,19 @@ jobs:
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
run: git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git src
- 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
/bin/attic login local ${{ vars.ATTIC_URL }} ${{ secrets.ATTIC_TOKEN }}
/bin/attic use ${{ vars.ATTIC_CACHE }}
- name: Build image
run: nix build --out-link image src#packages.x86_64-linux.atticd
- name: Push image to Nix cache
run: /bin/attic push ${{ vars.ATTIC_CACHE }} image
- 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 login --tls-verify --username ${{ vars.RUNNER_USER }} --password ${{ secrets.RUNNER_TOKEN }} ${GITHUB_SERVER_URL}
- name: Push image to container registry
run: |
/bin/skopeo --insecure-policy copy docker-archive:./atticd docker://git.kun.is/home/atticd:latest
gitrev=$(git --git-dir checkout/.git --work-tree checkout rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:./atticd docker://git.kun.is/home/atticd:$gitrev
/bin/skopeo --insecure-policy copy docker-archive:image docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}:latest
gitrev=$(git --git-dir src/.git --work-tree src rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:src docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}:$gitrev

View file

@ -6,19 +6,19 @@ jobs:
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
run: git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git src
- 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
/bin/attic login local ${{ vars.ATTIC_URL }} ${{ secrets.ATTIC_TOKEN }}
/bin/attic use ${{ vars.ATTIC_CACHE }}
- name: Build image
run: nix build --out-link image src#packages.x86_64-linux.blog-pim
- name: Push image to Nix cache
run: /bin/attic push ${{ vars.ATTIC_CACHE }} image
- 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 login --tls-verify --username ${{ vars.RUNNER_USER }} --password ${{ secrets.RUNNER_TOKEN }} ${GITHUB_SERVER_URL}
- name: Push image to container registry
run: |
/bin/skopeo --insecure-policy copy docker-archive:./blog-pim docker://git.kun.is/home/blog-pim:latest
gitrev=$(git --git-dir checkout/.git --work-tree checkout rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:./blog-pim docker://git.kun.is/home/blog-pim:$gitrev
/bin/skopeo --insecure-policy copy docker-archive:image docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}:latest
gitrev=$(git --git-dir src/.git --work-tree src rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:src docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}:$gitrev

View file

@ -6,19 +6,19 @@ jobs:
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
run: git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git src
- 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
/bin/attic login local ${{ vars.ATTIC_URL }} ${{ secrets.ATTIC_TOKEN }}
/bin/attic use ${{ vars.ATTIC_CACHE }}
- name: Build image
run: nix build --out-link image src#packages.x86_64-linux.forgejo-nix-action
- name: Push image to Nix cache
run: /bin/attic push ${{ vars.ATTIC_CACHE }} image
- 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 login --tls-verify --username ${{ vars.RUNNER_USER }} --password ${{ secrets.RUNNER_TOKEN }} ${GITHUB_SERVER_URL}
- name: Push image to container registry
run: |
/bin/skopeo --insecure-policy copy docker-archive:./forgejo-nix-action docker://git.kun.is/home/forgejo-nix-action:latest
gitrev=$(git --git-dir checkout/.git --work-tree checkout rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:./forgejo-nix-action docker://git.kun.is/home/forgejo-nix-action:$gitrev
/bin/skopeo --insecure-policy copy docker-archive:image docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}:latest
gitrev=$(git --git-dir src/.git --work-tree src rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:src docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}:$gitrev