diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 77138ea..78ba846 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,4 +25,6 @@ jobs: - name: Deploy env: IMAGE_VERSION: ${{ github.ref_name }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} run: ./scripts/deploy.sh diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 34d9bd5..14c838a 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -6,6 +6,8 @@ cd ui && npm ci --legacy-peer-deps && npm run build cd - || exit 1 GOOS=linux GOARCH=amd64 go build -o ./bin/api + +docker login --username="${DOCKER_USERNAME}" --password="${DOCKER_PASSWORD}" docker buildx build --platform="linux/amd64" --push -t "lucasrod96/oss-contribute:${IMAGE_VERSION}" . terraform init