Merge pull request #20 from kamikazebr/dev #12
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: Staging Build Vector Server | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
check-changes: | |
name: Check for changes | |
runs-on: ubuntu-latest | |
outputs: | |
any_changed: ${{ steps.changed-files.outputs.any_changed }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get changed files in the packages/vector_server folder | |
id: changed-files | |
uses: tj-actions/changed-files@v40 | |
with: | |
files: packages/vector_server/**/* | |
build: | |
name: Build + Push Image | |
needs: check-changes | |
if: needs.check-changes.outputs.any_changed == 'true' | |
uses: ./.github/workflows/build-push.yml | |
with: | |
CONTEXT: ./packages/vector_server | |
TARGET: prod | |
IMAGE_NAME: vector_server | |
# Only used with nektos/act to test locally | |
# secrets: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
skip-build: | |
name: Skip Build | |
needs: check-changes | |
if: needs.check-changes.outputs.any_changed != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Skip Build | |
run: echo "Skipping build because there are no changes in packages/vector_server" | |