diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index 10388ea..8fadd3e 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -19,12 +19,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - # - name: Log in to Docker Hub - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build Docker image run: | docker build \ @@ -32,11 +26,11 @@ jobs: --build-arg NODE_ENV=dev \ --build-arg DOMAIN=xyzuan.my.id \ --build-arg PASSWORD_PEPPER=${{ secrets.PASSWORD_PEPPER }} \ - --build-arg DATABASE_URL=${{ secrets.DATABASE_URL }} \ + --build-arg DATABASE_URL=${{ secrets.DATABASE_URL_DEV }} \ --build-arg GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} \ --build-arg GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }} \ - --build-arg GITHUB_CLIENT_ID=${{ secrets.GITHUB_CLIENT_ID }} \ - --build-arg GITHUB_CLIENT_SECRET=${{ secrets.GITHUB_CLIENT_SECRET }} \ + --build-arg GITHUB_CLIENT_ID=${{ secrets.GH_CLIENT_ID }} \ + --build-arg GITHUB_CLIENT_SECRET=${{ secrets.GH_CLIENT_SECRET }} \ --build-arg LINKEDIN_CLIENT_ID=${{ secrets.LINKEDIN_CLIENT_ID }} \ --build-arg LINKEDIN_CLIENT_SECRET=${{ secrets.LINKEDIN_CLIENT_SECRET }} \ --build-arg TELEGRAM_TOKEN=${{ secrets.TELEGRAM_TOKEN }} \ @@ -44,17 +38,15 @@ jobs: --build-arg CLOUDINARY_CLOUD_NAME=${{ secrets.CLOUDINARY_CLOUD_NAME }} \ --build-arg CLOUDINARY_API_KEY=${{ secrets.CLOUDINARY_API_KEY }} \ --build-arg CLOUDINARY_API_SECRET=${{ secrets.CLOUDINARY_API_SECRET }} \ - -t xyzuan_be:latest -f misc/Dockerfile.dev . + -t ghcr.io/xyzuan/xyzuan_be:latest -f misc/Dockerfile.dev . - name: Tag Docker image run: | - IMAGE_NAME=xyzuan_be + IMAGE_NAME=ghcr.io/xyzuan/xyzuan_be GIT_SHA=$(echo "${{ github.sha }}" | head -c 7) docker tag $IMAGE_NAME:latest $IMAGE_NAME:$GIT_SHA - # - name: Push Docker image - # run: | - # IMAGE_NAME=xyzuan_be - # GIT_SHA=$(echo "${{ github.sha }}" | head -c 7) - # docker push $IMAGE_NAME:latest - # docker push $IMAGE_NAME:$GIT_SHA + - name: Push Docker image + run: | + docker login --username xyzuan --password ${{ secrets.GH_TOKEN }} ghcr.io + docker push ghcr.io/xyzuan/xyzuan_be