added pipeline for nodejs docker pipeline

This commit is contained in:
Tobias Lehmann 2024-09-09 12:00:03 +02:00
parent 93edacbafb
commit 520d12be19

View File

@ -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"