Skip to content

Commit cadd58a

Browse files
ough
1 parent 072bf06 commit cadd58a

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
pull_request:
77
branches: [ "main" ]
88

9-
env:
10-
IMAGE_NAME: lastfm-rust
11-
129
jobs:
1310

1411
build:
@@ -25,17 +22,4 @@ jobs:
2522

2623
- name: Push image
2724
run: |
28-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
29-
30-
# This changes all uppercase characters to lowercase.
31-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
32-
# This strips the git ref prefix from the version.
33-
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
34-
# This strips the "v" prefix from the tag name.
35-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
36-
# This uses the Docker `latest` tag convention.
37-
[ "$VERSION" == "main" ] && VERSION=latest
38-
echo IMAGE_ID=$IMAGE_ID
39-
echo VERSION=$VERSION
40-
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
41-
docker push $IMAGE_ID:$VERSION
25+
docker push ghcr.io/circularsprojects/lastfm-rust:latest

0 commit comments

Comments
 (0)