Skip to content

Commit 13ef131

Browse files
committed
reformat script
1 parent 5d7b6db commit 13ef131

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ jobs:
8989
- name: Decide image tag name
9090
id: determine
9191
env:
92-
git_tag: ${{ steps.git_info.outputs.tag }}
92+
git_tag: ${{ steps.git_info.outputs.tag }}
9393
run: |
94-
repo="${GITHUB_REPOSITORY,,}" # to lower case
95-
# if build triggered by tag, use tag name
96-
tag="${git_tag:-latest}"
97-
dock_image=$repo:$tag
94+
repo="${GITHUB_REPOSITORY,,}" # to lower case
95+
# if build triggered by tag, use tag name
96+
tag="${git_tag:-latest}"
97+
dock_image=$repo:$tag
9898
echo $dock_image
9999
echo "dock_image=$dock_image" >> $GITHUB_OUTPUT
100100
echo "repo=$repo" >> $GITHUB_OUTPUT
@@ -126,54 +126,54 @@ jobs:
126126
- name: Login to GitHub Container Registry
127127
uses: docker/login-action@v1
128128
with:
129-
registry: ghcr.io
130-
username: ${{ github.repository_owner }}
131-
password: ${{ secrets.GITHUB_TOKEN }}
129+
registry: ghcr.io
130+
username: ${{ github.repository_owner }}
131+
password: ${{ secrets.GITHUB_TOKEN }}
132132

133133
- name: Build and push
134134
uses: docker/build-push-action@v2
135135
id: docker_build
136136
with:
137-
context: .
138-
file: ./Dockerfile
139-
tags: |
140-
${{ steps.determine.outputs.dock_image }}
141-
localhost:5000/${{ steps.determine.outputs.dock_image }}
142-
ghcr.io/${{ steps.determine.outputs.dock_image }}
143-
platforms: linux/amd64
144-
push: true
145-
cache-from: type=local,src=/tmp/.buildx-cache
146-
cache-to: type=local,dest=/tmp/.buildx-cache
137+
context: .
138+
file: ./Dockerfile
139+
tags: |
140+
${{ steps.determine.outputs.dock_image }}
141+
localhost:5000/${{ steps.determine.outputs.dock_image }}
142+
ghcr.io/${{ steps.determine.outputs.dock_image }}
143+
platforms: linux/amd64
144+
push: true
145+
cache-from: type=local,src=/tmp/.buildx-cache
146+
cache-to: type=local,dest=/tmp/.buildx-cache
147147
148148
- name: Get plugin meta
149149
id: pluginmeta
150150
run: |
151-
repo=${{ steps.determine.outputs.repo }}
152-
dock_image=${{ steps.determine.outputs.dock_image }}
153-
docker pull localhost:5000/$dock_image
154-
docker tag localhost:5000/$dock_image $dock_image
155-
script=$(docker inspect --format '{{ (index .Config.Cmd 0) }}' $dock_image)
156-
docker run --rm $dock_image $script --json \
157-
| jq '. += {"name":"pl-lld_inference", "dock_image": "'$dock_image'", "public_repo": "'${{ github.server_url }}/${{ github.repository }}'" }' \
158-
> /tmp/description.json
151+
repo=${{ steps.determine.outputs.repo }}
152+
dock_image=${{ steps.determine.outputs.dock_image }}
153+
docker pull localhost:5000/$dock_image
154+
docker tag localhost:5000/$dock_image $dock_image
155+
script=$(docker inspect --format '{{ (index .Config.Cmd 0) }}' $dock_image)
156+
docker run --rm $dock_image $script --json \
157+
| jq '. += {"name":"pl-lld_inference", "dock_image": "'$dock_image'", "public_repo": "'${{ github.server_url }}/${{ github.repository }}'" }' \
158+
> /tmp/description.json
159159
160160
- name: Update DockerHub description
161161
uses: peter-evans/dockerhub-description@v2
162162
continue-on-error: true # it is not crucial that this works
163163
with:
164-
username: ${{ secrets.DOCKERHUB_USERNAME }}
165-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
166-
short-description: ${{ steps.pluginmeta.outputs.title }}
167-
readme-filepath: ./README.rst
168-
repository: ${{ steps.determine.outputs.repo }}
164+
username: ${{ secrets.DOCKERHUB_USERNAME }}
165+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
166+
short-description: ${{ steps.pluginmeta.outputs.title }}
167+
readme-filepath: ./README.rst
168+
repository: ${{ steps.determine.outputs.repo }}
169169

170170
- name: Upload ChRIS Plugin
171171
id: upload
172172
if: github.ref_type == 'tag'
173173
uses: FNNDSC/upload-chris-plugin@main
174174
with:
175-
description_file: /tmp/description.json
176-
username: ${{ secrets.CHRISPROJECT_USERNAME }}
177-
password: ${{ secrets.CHRISPROJECT_PASSWORD }}
178-
chris_url: https://cube.chrisproject.org/api/v1/
179-
compute_names: NERC
175+
description_file: /tmp/description.json
176+
username: ${{ secrets.CHRISPROJECT_USERNAME }}
177+
password: ${{ secrets.CHRISPROJECT_PASSWORD }}
178+
chris_url: https://cube.chrisproject.org/api/v1/
179+
compute_names: NERC

0 commit comments

Comments
 (0)