-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
204 changed files
with
34,013 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
Oops, something went wrong.