Skip to content

Commit 8731e06

Browse files
authored
fix image tags (#30)
* fix tags * test replacement * rever package files * test * test * Update image.yml * Update image.yml * Update image-release.yml * Update image.yml * update singularity CI * Update image.yml * update ci
1 parent 93bb133 commit 8731e06

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

.github/workflows/image-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5151
flavor: |
52-
latest=false
52+
latest=true
5353
# Build and push Docker image with Buildx (don't push on PR)
5454
# https://github.com/docker/build-push-action
5555
- name: Build and push Docker image
@@ -86,7 +86,7 @@ jobs:
8686
- name: Get release version
8787
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
8888

89-
- name: Build Container
89+
- name: Create tag for Singularity
9090
env:
9191
recipe: ${{ matrix.recipe }}
9292
run: |
@@ -106,6 +106,10 @@ jobs:
106106
ls
107107
fi
108108
109+
- name: Update Singularity file tag
110+
run: |
111+
sed -i "s/latest/$tag/" ./Singularity
112+
109113
- name: Login and Deploy Container
110114
#if: (github.event_name != 'pull_request')
111115
env:

.github/workflows/image.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6060
flavor: |
61-
latest=true
61+
latest=false
6262
6363
# Build and push Docker image with Buildx (don't push on PR)
6464
# https://github.com/docker/build-push-action
@@ -83,12 +83,17 @@ jobs:
8383
steps:
8484
- name: Check out code for the container build
8585
uses: actions/checkout@v3
86+
8687
- name: Continue if Singularity Recipe Exists
8788
run: |
8889
if [[ -f "${{ matrix.recipe }}" ]]; then
8990
echo "keepgoing=true" >> $GITHUB_ENV
90-
fi
91-
- name: Build Container
91+
fi
92+
93+
- name: Get build branch name
94+
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
95+
96+
- name: Create tag for Singularity
9297
if: ${{ env.keepgoing == 'true' }}
9398
env:
9499
recipe: ${{ matrix.recipe }}
@@ -98,16 +103,20 @@ jobs:
98103
sudo -E singularity build container.sif ${{ matrix.recipe }}
99104
tag=$(echo "${recipe/Singularity\./}")
100105
if [ "$tag" == "Singularity" ]; then
101-
tag=latest
106+
tag=$TAG
102107
fi
103-
# Build the container and name by tag
104108
echo "Tag is $tag."
105109
echo "tag=$tag" >> $GITHUB_ENV
106110
else
107111
echo "${{ matrix.recipe }} is not found."
108112
echo "Present working directory: $PWD"
109113
ls
110114
fi
115+
116+
- name: Update Singularity file tag
117+
run: |
118+
sed -i "s/latest/$tag/" ./Singularity
119+
111120
- name: Login and Deploy Container
112121
if: (github.event_name != 'pull_request')
113122
env:

Singularity

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
Bootstrap: docker
22
From: netreconlab/parse-hipaa-dashboard:latest
33

4-
%runscript
5-
echo "Successfully built singularity from docker!"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/jasmine": "4.3.1",
3636
"eslint": "8.30.0",
3737
"eslint-plugin-flowtype": "8.0.3",
38-
"jasmine": "^4.0.2",
38+
"jasmine": "^4.5.0",
3939
"madge": "5.0.1",
4040
"nyc": "15.1.0",
4141
"typescript": "4.9.4"

0 commit comments

Comments
 (0)