|
79 | 79 | - name: Set up Docker Buildx |
80 | 80 | uses: docker/setup-buildx-action@v4.0.0 |
81 | 81 |
|
| 82 | + - name: Set image name |
| 83 | + id: image |
| 84 | + run: echo "name=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" |
| 85 | + |
82 | 86 | - name: Build and push Docker image to GitHub Container Registry |
83 | 87 | uses: docker/build-push-action@v7.0.0 |
84 | 88 | with: |
|
89 | 93 | cache-from: type=gha |
90 | 94 | cache-to: type=gha,mode=max |
91 | 95 | tags: | |
92 | | - ghcr.io/${{ github.repository }}:latest |
93 | | - ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.semver }} |
94 | | - ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.club }} |
| 96 | + ghcr.io/${{ steps.image.outputs.name }}:latest |
| 97 | + ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.semver }} |
| 98 | + ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.club }} |
95 | 99 |
|
96 | 100 | - name: Generate changelog |
97 | 101 | id: changelog |
@@ -121,19 +125,19 @@ jobs: |
121 | 125 |
|
122 | 126 | ```bash |
123 | 127 | # By semantic version (recommended) |
124 | | - docker pull ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.semver }} |
| 128 | + docker pull ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.semver }} |
125 | 129 |
|
126 | 130 | # By club name |
127 | | - docker pull ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.club }} |
| 131 | + docker pull ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.club }} |
128 | 132 |
|
129 | 133 | # Latest |
130 | | - docker pull ghcr.io/${{ github.repository }}:latest |
| 134 | + docker pull ghcr.io/${{ steps.image.outputs.name }}:latest |
131 | 135 | ``` |
132 | 136 |
|
133 | 137 | ## Quick Start |
134 | 138 |
|
135 | 139 | ```bash |
136 | | - docker run -p 9000:9000 ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.semver }} |
| 140 | + docker run -p 9000:9000 ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.semver }} |
137 | 141 | ``` |
138 | 142 |
|
139 | 143 | API available at `http://localhost:9000` · Swagger UI at `http://localhost:9000/swagger/index.html` |
|
0 commit comments