Merge pull request #187 from fsinfuhh/fix/link-antidiscrimination #179
This file contains hidden or 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: deploy | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - master | |
| - staging | |
| jobs: | |
| test: | |
| uses: ./.github/workflows/test.yml | |
| build-container: | |
| needs: [ test ] | |
| uses: fsinfuhh/workflows/.github/workflows/build_image.yml@main | |
| determine-app-path: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| app-path: ${{ steps.determine-app-path.outputs.app-path }} | |
| steps: | |
| - id: determine-app-path | |
| run: | | |
| if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "master" ]]; then | |
| echo "app-path=dashboard" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.ref_name }}" == "stage" || "${{ github.ref_name }}" == "staging" ]]; then | |
| echo "app-path=dashboard-staging" >> $GITHUB_OUTPUT | |
| else | |
| echo "Invalid github ref name ${{ github.ref_name }}" | |
| exit 1 | |
| fi | |
| deploy: | |
| needs: [ build-container, determine-app-path ] | |
| uses: fsinfuhh/workflows/.github/workflows/deploy.yml@main | |
| secrets: inherit | |
| with: | |
| app_path: k8s/apps/mafiasi/${{ needs.determine-app-path.outputs.app-path }} | |
| image_name: ${{ needs.build-container.outputs.image_name }} | |
| new_digest: ${{ needs.build-container.outputs.image_digest }} |