feat: try buildah
Some checks failed
Build Astro / 🧪 Astro check (push) Successful in 24s
Build Astro / 🚢 Deploy (push) Failing after 1s

This commit is contained in:
ndsboy 2025-02-23 00:12:01 +00:00
parent 5fab71837a
commit 1cfc0a44e6
2 changed files with 33 additions and 26 deletions

View file

@ -22,32 +22,34 @@ jobs:
name: 🚢 Deploy name: 🚢 Deploy
runs-on: docker runs-on: docker
container: container:
image: node:lts image: quay.io/buildah/stable:latest
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
needs: [check] needs: [check]
steps: steps:
- uses: https://github.com/actions/checkout@v4 - run: buildah build -f Containerfile .
- uses: https://github.com/denoland/setup-deno@v2 # - uses: https://github.com/actions/checkout@v4
with: #
deno-version: v2.x # - uses: https://github.com/denoland/setup-deno@v2
- run: deno task install # with:
- run: deno task build # deno-version: v2.x
# - run: deno task install
- name: build containerfile # - run: deno task build
id: build-image #
uses: https://github.com/redhat-actions/buildah-build@v2 # - name: build containerfile
with: # id: build-image
image: website # uses: https://github.com/redhat-actions/buildah-build@v2
tags: latest # with:
containerfiles: | # image: website
./Containerfile # tags: latest
# containerfiles: |
- name: Push to registry # ./Containerfile
uses: https://github.com/redhat-actions/push-to-registry@v2 #
with: # - name: Push to registry
image: ${{ steps.build-image.outputs.image }} # uses: https://github.com/redhat-actions/push-to-registry@v2
tags: ${{ steps.build-image.outputs.tags }} # with:
username: token # image: ${{ steps.build-image.outputs.image }}
password: ${{ secrets.GITHUB_TOKEN }} # tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ github.server_url }}/${{ github.repository }} # username: token
# password: ${{ secrets.GITHUB_TOKEN }}
# registry: ${{ github.server_url }}/${{ github.repository }}

View file

@ -1,6 +1,11 @@
FROM docker.io/denoland/deno AS build
COPY . .
RUN deno task install
RUN deno task build
FROM ghcr.io/swablab/documents:latest AS documents FROM ghcr.io/swablab/documents:latest AS documents
FROM docker.io/nginxinc/nginx-unprivileged:latest FROM docker.io/nginxinc/nginx-unprivileged:latest
COPY ./nginx.conf /etc/nginx/conf.d/default.conf COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY ./dist /usr/share/nginx/html COPY --from=build ./dist /usr/share/nginx/html
COPY --from=documents / /usr/share/nginx/html/docs COPY --from=documents / /usr/share/nginx/html/docs