From 34c7cb683a267367010c6a738420e4aaf61c1986 Mon Sep 17 00:00:00 2001 From: ndsboy Date: Sun, 23 Feb 2025 01:06:25 +0000 Subject: [PATCH] feat: use buildah --- .forgejo/workflows/main.yml | 47 ++++--------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml index 8428737..3a41af7 100644 --- a/.forgejo/workflows/main.yml +++ b/.forgejo/workflows/main.yml @@ -5,53 +5,14 @@ env: ASTRO_TELEMETRY_DISABLED: true jobs: - check: - name: 🧪 Astro check - runs-on: docker - container: - image: node:lts - steps: - - uses: https://github.com/actions/checkout@v4 - - uses: https://github.com/denoland/setup-deno@v2 - with: - deno-version: v2.x - - run: deno task install - - run: deno task check - deploy: - name: 🚢 Deploy + name: Deploy runs-on: docker container: image: quay.io/buildah/stable:latest if: github.ref == 'refs/heads/main' - needs: [check] steps: - run: curl ${{ github.server_url }}/${{ github.repository }}/archive/main.tar.gz | tar -xz - - run: cd website - - run: buildah build -f Containerfile . - - # - uses: https://github.com/actions/checkout@v4 - # - # - uses: https://github.com/denoland/setup-deno@v2 - # with: - # deno-version: v2.x - # - run: deno task install - # - run: deno task build - # - # - name: build containerfile - # id: build-image - # uses: https://github.com/redhat-actions/buildah-build@v2 - # with: - # image: website - # tags: latest - # containerfiles: | - # ./Containerfile - # - # - name: Push to registry - # uses: https://github.com/redhat-actions/push-to-registry@v2 - # with: - # image: ${{ steps.build-image.outputs.image }} - # tags: ${{ steps.build-image.outputs.tags }} - # username: token - # password: ${{ secrets.GITHUB_TOKEN }} - # registry: ${{ github.server_url }}/${{ github.repository }} + - run: buildah build -f website/Containerfile -t git.swablab.de/${{ github.repository }}:latest website + - run: buildah login -u token -p ${{ secrets.GITHUB_TOKEN }} git.swablab.de + - run: buildah push git.swablab.de/${{ github.repository }}:latest