feat: use buildah
Some checks failed
Build Astro / Deploy (push) Failing after 26s

This commit is contained in:
ndsboy 2025-02-23 01:06:25 +00:00
parent 1183b6eedf
commit 34c7cb683a

View file

@ -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