-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (46 loc) · 1.47 KB
/
centos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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/[email protected]
- name: Publish sirius install
env:
GITHUB_TOKEN: ${{ github.token }}
if: ${{ env.RELEASE_CREATED == 'true' }}
uses: actions/[email protected]
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