Skip to content

Commit

Permalink
teste
Browse files Browse the repository at this point in the history
  • Loading branch information
joellensilva committed Jan 15, 2025
1 parent 99509d7 commit 769ab45
Showing 1 changed file with 32 additions and 30 deletions.
62 changes: 32 additions & 30 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
#schedule:
# - cron: '22 13 * * *'
push:
branches: [ main ]
branches: [ main, problema-com-dependencias ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
#pull_request:
Expand All @@ -36,36 +36,38 @@ jobs:

# Installs dependencies from requirements.txt
- name: Install dependencies
run: pip3 install -r requirements.txt
run: |
pip install --upgrade pip setuptools wheel
pip3 install --no-cache-dir -r requirements.txt
# Running all tests
- name: Running tests
run: python3 -m unittest discover -s ./src -p 'test_*.py'
# # Running all tests
# - name: Running tests
# run: python3 -m unittest discover -s ./src -p 'test_*.py'

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# # Login against a Docker registry except on PR
# # https://github.com/docker/login-action
# - name: Log into registry ${{ env.REGISTRY }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v1
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# # Extract metadata (tags, labels) for Docker
# # https://github.com/docker/metadata-action
# - name: Extract Docker metadata
# id: meta
# uses: docker/metadata-action@v3
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# # Build and push Docker image with Buildx (don't push on PR)
# # https://github.com/docker/build-push-action
# - name: Build and push Docker image
# uses: docker/build-push-action@v2
# with:
# context: .
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 769ab45

Please sign in to comment.