Skip to content

Commit

Permalink
to upload .rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Nov 28, 2024
1 parent e4705a8 commit 499dc59
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Centos7 CI (push and/or release)

on:
release:
types: [created]
types: [ created ]
push:
branches:
- develop
Expand Down Expand Up @@ -36,15 +36,14 @@ jobs:
steps:



#sparse checkout dockerfiles
- uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
docker/Dockerfile
docker/AntaresDeps
ref : ${{ env.REF }}
docker/Dockerfile
docker/AntaresDeps
ref: ${{ env.REF }}

- name: set env variables -- DockerFiles
run: |
Expand Down Expand Up @@ -76,32 +75,33 @@ jobs:

- name: Build the image and Antares
run: |
docker build \
-t antares:centos7 \
--build-arg="BRANCH=${{ env.REF }}" \
--build-arg="NPROC=$(nproc)" \
-f ${{ env.DOCKERFILE }} .
docker build \
-t antares:centos7 \
--build-arg="BRANCH=${{ env.REF }}" \
--build-arg="NPROC=$(nproc)" \
-f ${{ env.DOCKERFILE }} .
- name: create a container without starting it && retrieve the .tgz
run: |
container_id=$(docker create antares:centos7)
mkdir archive
docker cp $container_id:/workspace/Antares_Simulator/_build/antares-9.2.0-rc5-CentOS-7.9.2009.tar.gz archive/
docker cp $container_id:/workspace/Antares_Simulator/_build/antares-9.2.0-rc5-CentOS-7.9.2009.rpm archive/
docker rm $container_id
- name: Install gh if needed
if: ${{ env.IS_RELEASE == 'true' }}
run: |
wget https://github.com/cli/cli/releases/download/v2.52.0/gh_2.52.0_linux_amd64.rpm
rpm -i gh_2.52.0_linux_amd64.rpm
gh --version
wget https://github.com/cli/cli/releases/download/v2.52.0/gh_2.52.0_linux_amd64.rpm
rpm -i gh_2.52.0_linux_amd64.rpm
gh --version
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" archive/*.tar.gz _build/*.rpm
gh release upload "$tag" archive/*.tar.gz archive/*.rpm

0 comments on commit 499dc59

Please sign in to comment.