Atualizando pagina Sobre - Atualizando creditos #15
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: Preview Docker Image on Render | |
on: | |
push: | |
paths: | |
'app/**' | |
env: | |
DOCKERHUB_REPOSITORY_URL: docker.io/joaoallmeida/calculadora-fiis | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag $DOCKERHUB_REPOSITORY_URL:$(date +%s) | |
- name: Log in to Docker Hub | |
uses: docker/#-action@v2.2.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | |
- name: Docker Metadata action | |
uses: docker/metadata-action@v4.6.0 | |
id: meta | |
with: | |
images: ${{env.DOCKERHUB_REPOSITORY_URL}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4.1.1 | |
id: build | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Encode Parameter | |
run: | | |
echo ::set-env name=PARAM_ENCODE::$(echo `${{ env.DOCKERHUB_REPOSITORY_URL }}:${{ steps.meta.outputs.tags }} | sed 's|/|%2F|g' | sed 's|:|%2F|g'`) | |
- name: Deploy Render Service | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: https://api.render.com/deploy/${{ secrets.RENDER_SERVICE_ID }}?key=${{ secrets.HOOK_KEY_ID }}&imgURL=${{ env.PARAM_ENCODE }} | |
method: 'POST' |