Update .gitea/workflows/build.yml
This commit is contained in:
@@ -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: |
|
||||
@@ -68,4 +60,32 @@ jobs:
|
||||
- name: "Cleanup builder"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user