Skip to content

Commit 6ba92e9

Browse files
author
Naoki Kanazawa
committed
build-push-actionだとbuildしていることに気がついたので戻した
1 parent a024abe commit 6ba92e9

File tree

1 file changed

+30
-25
lines changed

1 file changed

+30
-25
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
#- "v[0-9]+.[0-9]+.[0-9]+"
88
- '*'
99

10+
env:
11+
REGISTRY_NAME: hnron-public.sakuracr.jp
12+
IMAGE_NAME: netcon
13+
1014
jobs:
1115
goreleaser:
1216
runs-on: ubuntu-latest
@@ -28,36 +32,37 @@ jobs:
2832
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2933

3034

31-
- name: Push to sakuracr
32-
uses: docker/build-push-action@v1
33-
with:
34-
username: ${{ secrets.SAKURACR_USERNAME }}
35-
password: ${{ secrets.SAKURACR_PASSWORD }}
36-
registry: hnron-public.sakuracr.jp
37-
repository: netcon
38-
tag_with_ref: true
35+
#- name: Push to sakuracr
36+
# uses: docker/build-push-action@v1
37+
# with:
38+
# username: ${{ secrets.SAKURACR_USERNAME }}
39+
# password: ${{ secrets.SAKURACR_PASSWORD }}
40+
# registry: hnron-public.sakuracr.jp
41+
# repository: netcon
42+
# tag_with_ref: true
43+
3944

40-
#- name: Log into registry
41-
# run: echo "${{ secrets.SAKURACR_PASSWORD }}" | docker login $REPOSITORY_NAME -u ${{ secrets.SAKURACR_USERNAME }} --password-stdin
42-
#- name: Push image
43-
# run: |
44-
# IMAGE_ID=$REPOSITORY_NAME/$IMAGE_NAME
45+
- name: Log into registry
46+
run: echo "${{ secrets.SAKURACR_PASSWORD }}" | docker login $REPOSITORY_NAME -u ${{ secrets.SAKURACR_USERNAME }} --password-stdin
47+
- name: Push image
48+
run: |
49+
IMAGE_ID=$REPOSITORY_NAME/$IMAGE_NAME
4550
46-
# # Change all uppercase to lowercase
47-
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
51+
# Change all uppercase to lowercase
52+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
4853
49-
# # Strip git ref prefix from version
50-
# VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
54+
# Strip git ref prefix from version
55+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
5156
52-
# # Strip "v" prefix from tag name
53-
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
57+
# Strip "v" prefix from tag name
58+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
5459
55-
# # Use Docker `latest` tag convention
56-
# [ "$VERSION" == "main" ] && VERSION=latest
60+
# Use Docker `latest` tag convention
61+
[ "$VERSION" == "main" ] && VERSION=latest
5762
58-
# echo IMAGE_ID=$IMAGE_ID
59-
# echo VERSION=$VERSION
63+
echo IMAGE_ID=$IMAGE_ID
64+
echo VERSION=$VERSION
6065
61-
# #docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
62-
# docker push $IMAGE_ID:$VERSION
66+
#docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
67+
docker push $IMAGE_ID:$VERSION
6368

0 commit comments

Comments
 (0)