Skip to content

Commit

Permalink
Use gchr registry
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzw committed Jun 19, 2024
1 parent 396de04 commit 39d68f7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

runs-on: ubuntu-latest
container:
image: mayjojo/cxx-cmake-project-template:main
image: ghcr.io/wangzw/cxx-cmake-project-template:main

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

runs-on: ubuntu-latest
container:
image: mayjojo/cxx-cmake-project-template:main
image: ghcr.io/wangzw/cxx-cmake-project-template:main

steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta

- name: Image meta
id: meta
uses: docker/metadata-action@v5
with:
images: mayjojo/cxx-cmake-project-template
images: ghcr.io/wangzw/cxx-cmake-project-template
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
- name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
demo:
image: mayjojo/cxx-cmake-project-template:main
image: ghcr.io/wangzw/cxx-cmake-project-template:main
entrypoint: /usr/sbin/init
hostname: demo
restart: always
Expand Down

0 comments on commit 39d68f7

Please sign in to comment.