Update Workflow #1
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
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 |