Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ permissions:

env:
GHCR_REGISTRY: ghcr.io
DOCKER_REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}
DOCKER_IMAGE: path-app

jobs:
release:
Expand Down Expand Up @@ -93,22 +91,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
if: steps.release.outputs.released == 'true'
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata
if: steps.release.outputs.released == 'true'
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.DOCKER_REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKER_IMAGE }}
tags: |
type=semver,pattern={{version}},value=${{ steps.release.outputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.release.outputs.tag }}
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ permissions:

env:
GHCR_REGISTRY: ghcr.io
DOCKER_REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}
DOCKER_IMAGE: path-app

jobs:
test:
Expand Down Expand Up @@ -179,27 +177,19 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.DOCKER_REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKER_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push to both registries
- name: Build and push to GHCR
uses: docker/build-push-action@v6
with:
context: .
Expand Down
Loading