feat: change titles #6
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
name: CI/CD | |
on: | |
push: | |
branches: | |
- deploy | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Login to DockerHub | |
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build docker | |
run: docker build . -t dorianneto/burn-secret-web -f ./.docker/go/Dockerfile --platform linux/amd64 | |
- name: Push docker | |
run: docker push dorianneto/burn-secret-web:latest | |
deploy: | |
runs-on: self-hosted | |
needs: build | |
steps: | |
- name: Pull docker image | |
run: docker pull dorianneto/burn-secret-web:latest | |
- name: Remove current container | |
run: docker rm -f burn-secret-web-container | |
- name: Runs container | |
run: docker run -d -p 80:80 --name burn-secret-web-container dorianneto/burn-secret-web |