Merge pull request #32 from rte-france/feature/new_api #111
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: CentOS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| - antares_integration | |
| - fix/* | |
| release: | |
| types: [ created ] | |
| jobs: | |
| build_sirius: | |
| name: build sirius | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Build sirius using docker image | |
| run: | | |
| docker build -t centos7-sirius -f docker/Dockerfile . | |
| - name: create a container without starting it && retrieve the .tgz | |
| run: | | |
| container_id=$(docker create centos7-sirius) | |
| docker cp $container_id:/centos-7_sirius-solver.zip /tmp | |
| - name: is release created | |
| shell: bash | |
| run: | | |
| release_created=${{ github.event_name == 'release' && github.event.action == 'created' }} | |
| echo "RELEASE_CREATED=$release_created" >> $GITHUB_ENV | |
| - name: Get release | |
| if: ${{ env.RELEASE_CREATED == 'true' }} | |
| id: get_release | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| uses: | |
| bruceadams/get-release@v1.3.2 | |
| - name: Publish sirius install | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| if: ${{ env.RELEASE_CREATED == 'true' }} | |
| uses: actions/upload-release-asset@v1.0.2 | |
| with: | |
| upload_url: ${{ steps.get_release.outputs.upload_url }} | |
| asset_path: /tmp/centos-7_sirius-solver.zip | |
| asset_name: centos-7_sirius-solver.zip | |
| asset_content_type: application/zip |