Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8bfb667

Browse files
committedMar 20, 2024·
cloning server's action for other containers
1 parent 1352e53 commit 8bfb667

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and publish HPCS container preparation image
2+
on: [push]
3+
4+
env:
5+
IMAGE_NAME: hpcs/data-prep
6+
7+
jobs:
8+
push:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build image
17+
run: docker build . -f ./client/container_preparation/Dockerfile -t $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
18+
19+
- name: Log in to registry
20+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
21+
22+
- name: Push image
23+
run: |
24+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
25+
26+
# This changes all uppercase characters to lowercase.
27+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
28+
29+
# This strips the git ref prefix from the version.
30+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
31+
32+
# This strips the "v" prefix from the tag name.
33+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
34+
35+
# This uses the Docker `latest` tag convention.
36+
[ "$VERSION" == "main" ] && VERSION=latest
37+
echo IMAGE_ID=$IMAGE_ID
38+
echo VERSION=$VERSION
39+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
40+
docker push $IMAGE_ID:$VERSION
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and publish HPCS data preparation image
2+
on: [push]
3+
4+
env:
5+
IMAGE_NAME: hpcs/data-prep
6+
7+
jobs:
8+
push:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build image
17+
run: docker build . -f ./client/data_preparation/Dockerfile -t $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
18+
19+
- name: Log in to registry
20+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
21+
22+
- name: Push image
23+
run: |
24+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
25+
26+
# This changes all uppercase characters to lowercase.
27+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
28+
29+
# This strips the git ref prefix from the version.
30+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
31+
32+
# This strips the "v" prefix from the tag name.
33+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
34+
35+
# This uses the Docker `latest` tag convention.
36+
[ "$VERSION" == "main" ] && VERSION=latest
37+
echo IMAGE_ID=$IMAGE_ID
38+
echo VERSION=$VERSION
39+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
40+
docker push $IMAGE_ID:$VERSION
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and publish HPCS jon preparation image
2+
on: [push]
3+
4+
env:
5+
IMAGE_NAME: hpcs/data-prep
6+
7+
jobs:
8+
push:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build image
17+
run: docker build . -f ./client/job_preparation/Dockerfile -t $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
18+
19+
- name: Log in to registry
20+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
21+
22+
- name: Push image
23+
run: |
24+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
25+
26+
# This changes all uppercase characters to lowercase.
27+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
28+
29+
# This strips the git ref prefix from the version.
30+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
31+
32+
# This strips the "v" prefix from the tag name.
33+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
34+
35+
# This uses the Docker `latest` tag convention.
36+
[ "$VERSION" == "main" ] && VERSION=latest
37+
echo IMAGE_ID=$IMAGE_ID
38+
echo VERSION=$VERSION
39+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
40+
docker push $IMAGE_ID:$VERSION

0 commit comments

Comments
 (0)
Please sign in to comment.