Skip to content

Commit

Permalink
Proyecto
Browse files Browse the repository at this point in the history
  • Loading branch information
JosueUPT committed Dec 10, 2024
1 parent d1462f6 commit 8f9c042
Show file tree
Hide file tree
Showing 204 changed files with 34,013 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DB_HOST=db
DB_USER=root
DB_PASSWORD=123456
DB_NAME=tienda_bd
61 changes: 61 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Docker Release

on:
push:
branches:
- main

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout código
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Generar versión automática
id: version
run: |
VERSION=$(date +'%Y.%m.%d.%H%M')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "Versión generada: ${VERSION}"
- name: Login en Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build y Push a Docker Hub
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/proyecto-codigo:latest
${{ secrets.DOCKERHUB_USERNAME }}/proyecto-codigo:${{ env.VERSION }}
- name: Configurar Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Crear y pushear tag
run: |
git tag v${{ env.VERSION }}
git push origin v${{ env.VERSION }}
- name: Crear Release en GitHub
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
body: |
🚀 Nueva versión desplegada:
- Docker Hub: ${{ secrets.DOCKERHUB_USERNAME }}/proyecto-codigo:${{ env.VERSION }}
- Fecha: $(date +'%Y-%m-%d %H:%M:%S')
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 8f9c042

Please sign in to comment.