diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml new file mode 100644 index 00000000..3d75fd28 --- /dev/null +++ b/.github/workflows/api.yml @@ -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 != 'actions@github.com' }} + 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 != 'actions@github.com' }} + run: | + docker image prune -f + docker builder prune -f \ No newline at end of file diff --git a/.github/workflows/action.yml b/.github/workflows/badges.yml similarity index 70% rename from .github/workflows/action.yml rename to .github/workflows/badges.yml index 0c1ea440..50443726 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/badges.yml @@ -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 != 'actions@github.com' }} - 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 != 'actions@github.com' }} - run: | - docker image prune -f - docker builder prune -f \ No newline at end of file + git push \ No newline at end of file