Skip to content

Commit 75ce64d

Browse files
authored
Merge pull request #3 from VirtualLiveLab/hotfix/repo-namecase-in-action
ci: set docker image tag in variables
2 parents e6e779f + 22e606a commit 75ce64d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/conoha.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
workflow_dispatch:
1414

1515
env:
16-
IMAGE_TAG: ghcr.io/${{ github.repository_owner }}/mikubot:latest
1716
CONTAINER_NAME: mikubot
1817

1918
jobs:
@@ -43,7 +42,7 @@ jobs:
4342
context: .
4443
file: ./Dockerfile
4544
push: true
46-
tags: ${{ env.IMAGE_TAG }}
45+
tags: ${{ vars.IMAGE_TAG }}
4746
cache-from: type=gha
4847
cache-to: type=gha, mode=max
4948

@@ -56,15 +55,15 @@ jobs:
5655
# always remove old container: https://stackoverflow.com/questions/34228864/stop-and-delete-docker-container-if-its-running
5756
script: |
5857
echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
59-
docker pull ${{ env.IMAGE_TAG }}
58+
docker pull ${{ vars.IMAGE_TAG }}
6059
docker stop ${{ env.CONTAINER_NAME }} || true && docker rm ${{ env.CONTAINER_NAME }} || true
6160
docker run \
6261
-d \
6362
--name ${{env.CONTAINER_NAME}} \
6463
--env DISCORD_BOT_TOKEN=${{secrets.DISCORD_TOKEN}} \
6564
--env LOG_CHANNEL_ID=${{vars.LOG_CHANNEL_ID}} \
6665
--env GUILD_ID=${{vars.GUILD_ID}} \
67-
${{ env.IMAGE_TAG }}
66+
${{ vars.IMAGE_TAG }}
6867
docker image prune -f
6968
script_stop: true
7069

.github/workflows/docker-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
uses: docker/build-push-action@v5
2727
with:
2828
context: .
29+
file: ./Dockerfile
2930
push: false
31+
tags: ${{ vars.IMAGE_TAG }}
3032
cache-from: type=gha
3133
cache-to: type=gha, mode=max
3234

0 commit comments

Comments
 (0)