Skip to content

Commit 56f0f86

Browse files
committed
feat: use ghcr
1 parent 93a6a8f commit 56f0f86

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77

88
env:
9+
IMAGE_NAME: ghcr.io/${{ github.repository }}
910
DEPLOY_PATH: /home/${{ secrets.USERNAME }}/projects/link-manager-api
1011

1112
jobs:
@@ -15,16 +16,17 @@ jobs:
1516
- name: Checkout the repo
1617
uses: actions/checkout@v4
1718

18-
- name: Login to Dockerhub
19+
- name: Login to GitHub Container Registry
1920
uses: docker/login-action@v3
2021
with:
21-
username: ${{ secrets.DOCKERHUB_USERNAME }}
22-
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
2325

2426
- name: Build and push Docker image
2527
run: |
26-
docker build --platform linux/amd64 -t axlz/link-manager-api .
27-
docker push axlz/link-manager-api
28+
docker build --platform linux/amd64 -t ${{ env.IMAGE_NAME }} .
29+
docker push ${{ env.IMAGE_NAME }}
2830
2931
- name: Send compose.yml to VPS
3032
uses: appleboy/scp-action@v1

compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22
server:
33
ports:
44
- "127.0.0.1:3500:3500"
5-
image: "axlz/link-manager-api"
5+
image: "ghcr.io/axeelz/link-manager-api"
66
env_file:
77
- .env
88
platform: linux/amd64

0 commit comments

Comments
 (0)