Test #91
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: Test | |
on: | |
workflow_run: | |
workflows: | |
- deploy | |
- "Build" | |
branches: | |
- main | |
types: | |
- completed | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.gitversion.outputs.semVer }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Use GitVersion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
showConfig: true | |
configFilePath: ./GitVersion.yml | |
- name: Display SemVer | |
run: | | |
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" | |
smoke: | |
runs-on: ubuntu-latest | |
needs: | |
- version | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download docker compose config | |
run: wget https://raw.githubusercontent.com/TechlauncherFireApp/docker/main/docker-compose.frontend.yml | |
- name: Find and Replace | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "ghcr.io/techlauncherfireapp/backend:latest" | |
replace: "ghcr.io/techlauncherfireapp/backend:${{ needs.version.outputs.version }}" | |
regex: false | |
- name: Docker Compose version | |
run: docker compose version | |
- name: Start containers | |
run: docker compose -f "docker-compose.frontend.yml" up -d --wait | |
- name: Test container | |
run: docker run --network container:backend-fireapp-1 appropriate/curl -s --retry 10 --retry-connrefused http://localhost:5000/ |