Skip to content

Commit

Permalink
Update .gitlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
IDmedia committed Feb 15, 2024
1 parent 2911b2c commit cff3bde
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ docker-build:

before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login --username $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
- echo "$GHCR_PASSWORD" | docker login --username $GHCR_USERNAME --password-stdin ghcr.io
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker push $CI_REGISTRY_IMAGE:latest

# Pushing to Docker Hub
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG $DOCKERHUB_USERNAME/$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker tag $CI_REGISTRY_IMAGE:latest $DOCKERHUB_USERNAME/$CI_REGISTRY_IMAGE:latest
- docker push $DOCKERHUB_USERNAME/$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker push $DOCKERHUB_USERNAME/$CI_REGISTRY_IMAGE:latest
# Pushing to GitHub Container Registry (ghcr.io)
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG ghcr.io/$GHCR_USERNAME/$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker tag $CI_REGISTRY_IMAGE:latest ghcr.io/$GHCR_USERNAME/$CI_REGISTRY_IMAGE:latest
- docker push ghcr.io/$GHCR_USERNAME/$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker push ghcr.io/$GHCR_USERNAME/$CI_REGISTRY_IMAGE:latest
only:
- tags

0 comments on commit cff3bde

Please sign in to comment.