react-docker-optimization/.woodpecker/.workflow.yml
hadestructhor 0fd3efe332
All checks were successful
ci/woodpecker/manual/workflow Pipeline was successful
ci/woodpecker/tag/workflow Pipeline was successful
feat: Simple Dockerfile version
2025-01-04 14:29:35 +01:00

26 lines
No EOL
891 B
YAML

when:
- event: [ tag, manual, push, pull_request ]
branch: main
steps:
- name: npm install
image: node:18
commands:
- npm install
- name: docker build and publish
when:
- event: [tag, manual, push, pull_request]
branch: main
image: docker
environment:
DOCKER_USERNAME:
from_secret: docker_public_username
DOCKER_PASSWORD:
from_secret: docker_public_password
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- docker login forgejo.transprot.eu -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker build -t 'forgejo.transprot.eu/public/react-simple:${CI_PIPELINE_NUMBER}' -t 'forgejo.transprot.eu/public/react-simple:latest' .
- docker push forgejo.transprot.eu/public/react-simple:${CI_PIPELINE_NUMBER}
- docker push forgejo.transprot.eu/public/react-simple:latest