diff --git a/.gitea/workflows/publish-docker-nodejs.yaml b/.gitea/workflows/publish-docker-nodejs.yaml new file mode 100644 index 0000000..7d77404 --- /dev/null +++ b/.gitea/workflows/publish-docker-nodejs.yaml @@ -0,0 +1,30 @@ +name: Publish docker nodejs workflow +on: + workflow_call: +jobs: + publish_docker: + name: Build and publish docker image for nodejs + runs-on: docker-ubuntu + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Download build artifacts (dist files) + uses: actions/download-artifact@v3 + with: + name: artifacts-build + path: dist/ + - name: Setup docker buildx environment + uses: docker/setup-buildx-action@v3 + - name: Login to docker registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.CONTAINER_REGISTRY_URL }} + username: ${{ vars.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + - name: Build and push docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: "${{ vars.CONTAINER_REGISTRY_URL }}/${{gitea.repository}}:latest" \ No newline at end of file