feat: try buildah
This commit is contained in:
parent
5fab71837a
commit
1cfc0a44e6
2 changed files with 33 additions and 26 deletions
|
@ -22,32 +22,34 @@ jobs:
|
|||
name: 🚢 Deploy
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:lts
|
||||
image: quay.io/buildah/stable:latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs: [check]
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
- run: buildah build -f Containerfile .
|
||||
|
||||
- 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 }}
|
||||
# - 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 }}
|
||||
|
|
|
@ -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 docker.io/nginxinc/nginx-unprivileged:latest
|
||||
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
|
Loading…
Add table
Reference in a new issue