-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Update API | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-api: | ||
name: Update API | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@master | ||
|
||
- name: Build Docker Container | ||
if: ${{ github.event.head_commit.author.email != '[email protected]' }} | ||
run: docker compose build | ||
|
||
- name: Restart Docker Container | ||
run: | | ||
docker compose down | ||
docker compose up -d | ||
- name: Clean Up Docker Images and Build Cache | ||
if: ${{ github.event.head_commit.author.email != '[email protected]' }} | ||
run: | | ||
docker image prune -f | ||
docker builder prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,26 +60,4 @@ jobs: | |
git config --local user.name "GitHub Actions" | ||
git add . | ||
git commit -m "Updated Badges" || exit 0 | ||
git push | ||
update-api: | ||
name: Update API | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@master | ||
|
||
- name: Build Docker Container | ||
if: ${{ github.event.head_commit.author.email != '[email protected]' }} | ||
run: docker compose build | ||
|
||
- name: Restart Docker Container | ||
run: | | ||
docker compose down | ||
docker compose up -d | ||
- name: Clean Up Docker Images and Build Cache | ||
if: ${{ github.event.head_commit.author.email != '[email protected]' }} | ||
run: | | ||
docker image prune -f | ||
docker builder prune -f | ||
git push |