feat: update Kubernetes manifests for benchmark API and improve secre… #11
This file contains hidden or 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
name: Build and Push Docker Images | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # Permite ejecutar manualmente desde la interfaz de GitHub | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and Push API Docker Image | |
run: | | |
VERSION=$(date +%Y%m%d-%H%M) | |
docker build --target=api -t theaverageunknown/cpu-benchmark-api:latest -t theaverageunknown/cpu-benchmark-api:$VERSION . | |
docker push theaverageunknown/cpu-benchmark-api:latest | |
docker push theaverageunknown/cpu-benchmark-api:$VERSION | |
- name: Build and Push Benchmark Docker Image | |
run: | | |
VERSION=$(date +%Y%m%d-%H%M) | |
docker build --target=benchmark -t theaverageunknown/cpu-benchmark:latest -t theaverageunknown/cpu-benchmark:$VERSION . | |
docker push theaverageunknown/cpu-benchmark:latest | |
docker push theaverageunknown/cpu-benchmark:$VERSION |