mirror of
https://github.com/TwiN/gatus.git
synced 2025-06-21 18:21:47 +02:00
ci: Push to ghcr instead of DockerHub for custom tags
This commit is contained in:
parent
76a8710e0b
commit
c9c2639f67
11
.github/workflows/publish-custom.yml
vendored
11
.github/workflows/publish-custom.yml
vendored
@ -16,17 +16,18 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Get image repository
|
- name: Get image repository
|
||||||
run: echo IMAGE_REPOSITORY=$(echo ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
run: echo GHCR_IMAGE_REPOSITORY=$(echo ghcr.io/${{ github.actor }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||||
- name: Login to Docker Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
registry: ghcr.io
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.IMAGE_REPOSITORY }}
|
images: ${{ env.GHCR_IMAGE_REPOSITORY }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=${{ inputs.tag }}
|
type=raw,value=${{ inputs.tag }}
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
Loading…
x
Reference in New Issue
Block a user