diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a957856..4bf60a2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ee4dedb..81427fc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index cae298b..36820bf 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -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: . diff --git a/docker-compose.yml b/docker-compose.yml index 9e4d28e..9980119 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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