Update .gitea/workflows/build.yml
All checks were successful
Build and Test / build (push) Successful in 1m18s
Build and Test / deploy (push) Successful in 5s

This commit is contained in:
2025-10-09 09:25:17 +00:00
parent e95b35d16d
commit 490537007b

View File

@@ -30,14 +30,6 @@ jobs:
id: output
run: |
echo "${{ steps.generator.outputs.docker }}" > Dockerfile
echo "${{ steps.generator.outputs.k8s }}" > k8s.yml
- name: "Replace APP_NAME"
run: |
NAME=$(echo "$IMAGE_NAME" | sed 's/\//-/g')
sed -i "s|APP_NAME|$NAME|g" k8s.yml
sed -i "s|IMAGE_NAME|$REGISTRY/$IMAGE_NAME:$IMAGE_TAG|g" k8s.yml
cat k8s.yml
- name: "Create buildkitd.toml"
run: |
@@ -69,3 +61,31 @@ jobs:
if: always()
run: docker buildx rm $BUILDER_NAME || true
- name: Set image name
id: export
run: |
echo "image=$REGISTRY/$IMAGE_NAME:$IMAGE_TAG" >> $GITEA_OUTPUT
outputs:
image: ${{ steps.export.outputs.image }}
deploy:
runs-on: k8s-runner-00
needs: build
env:
IMAGE_NAME: ${{ gitea.repository }}
DIGEST_IMAGE: ${{ needs.build.outputs.image }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Generate Dockerfile"
run: curl -o k8s.yml https://n8n.mceasy.cloud/webhook/generator/manifest?type=k8s
- name: "Replace APP_NAME"
run: |
NAME=$(echo "$IMAGE_NAME" | sed 's/\//-/g')
sed -i "s|APP_NAME|$NAME|g" k8s.yml
sed -i "s|IMAGE_NAME|$DIGEST_IMAGE|g" k8s.yml
cat k8s.yml