Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/node-api-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,3 @@ jobs:
tags: |
${{ env.IMAGE_NAME }}:main
${{ env.IMAGE_NAME }}:${{ github.sha }}

- name: Build Docker image for pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v6
with:
context: services/node-api
push: false
tags: ${{ env.IMAGE_NAME }}:pr-${{ github.event.pull_request.number }}
40 changes: 40 additions & 0 deletions .github/workflows/node-api-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: node-api-preview-cleanup

on:
pull_request:
types:
- closed

permissions:
contents: write
pull-requests: read

jobs:
cleanup-preview:
runs-on: ubuntu-latest

steps:
- name: Checkout main for GitOps cleanup
uses: actions/checkout@v4
with:
ref: main

- name: Remove preview application
run: |
PR_NUMBER="${{ github.event.pull_request.number }}"
rm -f "previews/node-api/pr-${PR_NUMBER}.yaml"

- name: Commit preview cleanup
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git add "previews/node-api/pr-${{ github.event.pull_request.number }}.yaml"

if git diff --cached --quiet; then
echo "No preview cleanup changes to commit"
exit 0
fi

git commit -m "Remove node-api preview for PR #${{ github.event.pull_request.number }}"
git push origin HEAD:main
1 change: 1 addition & 0 deletions .github/workflows/node-api-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- opened
- synchronize
- reopened

paths:
- services/node-api/**
- .github/workflows/node-api-preview.yaml
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
Binary file removed services/.DS_Store
Binary file not shown.
Binary file removed services/node-api/.DS_Store
Binary file not shown.
Loading