Skip to content

Commit

Permalink
Fix workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
MSECode committed Dec 19, 2023
1 parent 94212cd commit 5e308eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'branch'
description: 'branch to use'
required: true
default: 'master'
default: 'feature/**'
type: choice
options:
- master
- feature/**

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -200,8 +204,7 @@ jobs:
- name: Set date argument for Docker build
id: get_date
run: |
echo "$(date +'%d/%m/%Y_%H:%M:%S')" > DATE_HOUR
echo "DATE_HOUR_TAG=$(cat DATE_HOUR)" >> $GITHUB_OUTPUT
echo "DATE_HOUR=$( date +'%d-%m-%Y_%H:%M:%S' )" >> $GITHUB_OUTPUT
##################### Here we check the release version and replace Custom with stable only for the image name ######################
- name: Get release / master version
Expand Down Expand Up @@ -244,6 +247,7 @@ jobs:
echo "{{matrix.version}} - ${{matrix.version}}"
echo "{{matrix.apps}} - ${{matrix.apps}}"
echo "{{steps.get_version.outputs.VERSION}} - ${{steps.get_version.outputs.VERSION}}"
echo "{{steps.get_date.outputs.DATE_HOUR}} - ${{steps.get_date.outputs.DATE_HOUR}}"
echo "{{env.DEFAULT_USER}} - ${{env.DEFAULT_USER}}"
while read -r line || [ -n "$line" ]
do
Expand All @@ -253,6 +257,7 @@ jobs:
line=$(echo "$line" > temp.tmp && sed -i 's/{{matrix.version}}/${{matrix.version}}/g' temp.tmp && cat temp.tmp)
line=$(echo "$line" > temp.tmp && sed -i 's/{{matrix.apps}}/${{matrix.apps}}/g' temp.tmp && cat temp.tmp)
line=$(echo "$line" > temp.tmp && sed -i 's/{{steps.get_version.outputs.VERSION}}/${{steps.get_version.outputs.VERSION}}/g' temp.tmp && cat temp.tmp)
line=$(echo "$line" > temp.tmp && sed -i 's/{{steps.get_date.outputs.DATE_HOUR}}/${{steps.get_date.outputs.DATE_HOUR}}/g' temp.tmp && cat temp.tmp)
line=$(echo "$line" > temp.tmp && sed -i 's/{{env.REGISTRY}}/${{env.REGISTRY}}/g' temp.tmp && cat temp.tmp)
line=$(echo "$line" > temp.tmp && sed -i 's@{{env.REPOSITORY_NAME}}@${{env.REPOSITORY_NAME}}@g' temp.tmp && cat temp.tmp)
line=$(echo "$line" > temp.tmp && sed -i 's/{{env.IMAGE_PREFIX}}/${{env.IMAGE_PREFIX}}/g' temp.tmp && cat temp.tmp)
Expand Down Expand Up @@ -341,5 +346,5 @@ jobs:
img_name: ${{ steps.get_args.outputs.IMG_NAME }}
version_name: ${{ steps.get_version.outputs.VERSION }}
tag_name: ${{ steps.get_version.outputs.TAG }}
metatadata_name: ${{ steps.get_date.outputs.DATE_HOUR_TAG }}
metatadata_name: ${{ steps.get_date.outputs.DATE_HOUR }}

2 changes: 1 addition & 1 deletion dockerfile_images/basic/superbuild-icubhead/conf_build.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[sources]
START_IMG=ubuntu:jammy
$(cat DATE_TAG)
metadata={{steps.get_date.outputs.DATE_HOUR}}
release={{steps.get_version.outputs.VERSION}}
sbtag={{matrix.tag}}

Expand Down
3 changes: 1 addition & 2 deletions dockerfile_images/basic/superbuild/conf_build.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[sources]
START_IMG=ubuntu:jammy
metadata={{steps.get_date.outputs.DATE_HOUR_TAG}}
metadata={{steps.get_date.outputs.DATE_HOUR}}
release={{steps.get_version.outputs.VERSION}}
sbtag={{matrix.tag}}

Expand All @@ -15,4 +15,3 @@ START_IMG=ubuntu:jammy

[children]
superbuild-icubtest

0 comments on commit 5e308eb

Please sign in to comment.