Skip to content

Commit

Permalink
fix: releases-centos7.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sgatto committed Dec 16, 2021
1 parent 739585e commit 9b9e70c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 51 deletions.
89 changes: 47 additions & 42 deletions .github/workflows/releases-centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,55 @@ env:
jobs:

docker_publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Read antares-solver version
id: antares-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-version.json'
prop_path: 'antares_version'

- name: Read antares-deps version
id: antares-deps-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-version.json'
prop_path: 'antares_deps_version'

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5

- name: Create docker file with src
shell: bash
run: |
cd docker
sh build-docker-file-src.sh
- name: Docker file push
uses: elgohr/Publish-Docker-Github-Action@master
env:
ANTARES_DEPS_VERSION: ${{steps.antares-deps-version.outputs.prop}}
ANTARES_SOLVER_VERSION: ${{steps.antares-version.outputs.prop}}
ANTARES_XPANSION_TAG: ${{ steps.branch-name.outputs.current_branch }}
with:
name: antaresrte/rte-antares
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: build-centos7-src
cache: true
tags: centos7-xpansion-${{ steps.branch-name.outputs.current_branch }}
buildargs: ANTARES_DEPS_VERSION, ANTARES_SOLVER_VERSION, ANTARES_XPANSION_TAG

- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v1.1.2
with:
files: |
docker/centos7
antares-version.json
- name: Read antares-solver version
id: antares-version
if: steps.changed-files.outputs.modified_files != ''
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-version.json'
prop_path: 'antares_version'

- name: Read antares-deps version
id: antares-deps-version
if: steps.changed-files.outputs.modified_files != ''
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-version.json'
prop_path: 'antares_deps_version'

- name: Docker file push
id: docker_push
if: steps.changed-files.outputs.modified_files != ''
uses: elgohr/Publish-Docker-Github-Action@master
env:
ANTARES_DEPS_VERSION: ${{steps.antares-deps-version.outputs.prop}}
ANTARES_SOLVER_VERSION: ${{steps.antares-version.outputs.prop}}
with:
name: antaresrte/rte-antares
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7
cache: true
tags: centos7-xpansion
buildargs: ANTARES_DEPS_VERSION, ANTARES_SOLVER_VERSION

build:

Expand Down
3 changes: 0 additions & 3 deletions docker/build-docker-file-src.sh

This file was deleted.

6 changes: 0 additions & 6 deletions docker/centos7-src

This file was deleted.

0 comments on commit 9b9e70c

Please sign in to comment.