Update .gitea/workflows/build.yml
This commit is contained in:
@@ -30,14 +30,6 @@ jobs:
|
|||||||
id: output
|
id: output
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.generator.outputs.docker }}" > Dockerfile
|
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"
|
- name: "Create buildkitd.toml"
|
||||||
run: |
|
run: |
|
||||||
@@ -69,3 +61,31 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
run: docker buildx rm $BUILDER_NAME || true
|
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
|
||||||
|
|
||||||
Reference in New Issue
Block a user