Add CICD job to build Docker image
Some checks failed
Push Workflows / rustfmt (push) Successful in 4s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / docs (push) Successful in 53s
Push Workflows / clippy (push) Successful in 53s
Push Workflows / test (push) Successful in 1m2s
Push Workflows / build (push) Successful in 1m55s
Push Workflows / nix-build (push) Successful in 5m27s
Push Workflows / docker-build (push) Failing after 14s
Some checks failed
Push Workflows / rustfmt (push) Successful in 4s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / docs (push) Successful in 53s
Push Workflows / clippy (push) Successful in 53s
Push Workflows / test (push) Successful in 1m2s
Push Workflows / build (push) Successful in 1m55s
Push Workflows / nix-build (push) Successful in 5m27s
Push Workflows / docker-build (push) Failing after 14s
This commit is contained in:
@@ -84,3 +84,38 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Run tailwindcss
|
||||
run: tailwindcss --input style/tailwind.css
|
||||
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest-docker
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Gitea container registry
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ env.registry }}
|
||||
username: ${{ env.actions_user }}
|
||||
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||
- name: Get Image Name
|
||||
id: get-image-name
|
||||
run: |
|
||||
echo "IMAGE_NAME=$(echo ${{ env.registry }}/${{ gitea.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ steps.get-image-name.outputs.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=sha
|
||||
type=ref,event=branch
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
Reference in New Issue
Block a user