mirror of
https://github.com/tiennm99/koyeb-example-spring-boot.git
synced 2026-07-20 22:21:25 +00:00
add readme and GitHub action files
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: Keep Repository Active
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 */28 * *'
|
||||
|
||||
jobs:
|
||||
create-empty-commit:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name 'Automatic action'
|
||||
git config user.email 'noreply@koyeb.com'
|
||||
|
||||
- name: Create an empty commit and push
|
||||
run: |
|
||||
git commit --allow-empty -m "Automated empty commit to keep repo active" -m "This commit is generated automatically every few weeks to prevent GitHub Actions from being disabled due to inactivity."
|
||||
git push origin main
|
||||
@@ -0,0 +1,20 @@
|
||||
name: Cleanup Koyeb application
|
||||
|
||||
on:
|
||||
delete:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install and configure the Koyeb CLI
|
||||
uses: koyeb-community/install-koyeb-cli@v2
|
||||
with:
|
||||
api_token: "${{ secrets.KOYEB_EXAMPLES_APPS_TOKEN }}"
|
||||
|
||||
- name: Cleanup Koyeb application
|
||||
uses: koyeb/action-git-deploy/cleanup@v1
|
||||
with:
|
||||
app-name: spring-boot-${{ github.event.ref }}
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Build and deploy the application to Koyeb
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '55 8 * * *'
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
concurrency:
|
||||
group: "${{ github.ref_name }}"
|
||||
cancel-in-progress: true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install and configure the Koyeb CLI
|
||||
uses: koyeb-community/install-koyeb-cli@v2
|
||||
with:
|
||||
api_token: "${{ secrets.KOYEB_EXAMPLES_APPS_TOKEN }}"
|
||||
|
||||
- name: Build and deploy the application
|
||||
uses: koyeb/action-git-deploy@v1
|
||||
with:
|
||||
app-name: spring-boot-${{ github.ref_name }}
|
||||
service-ports: "8000:http"
|
||||
service-routes: "/:8000"
|
||||
skip-cache: true
|
||||
Reference in New Issue
Block a user