Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflows #7

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ node_modules
cypress*
*git*
docker-compose.yaml
assets/*
assets/*
*.env
*.secrets
7 changes: 4 additions & 3 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker image
name: Publish Docker image (DockerHub)

on:
push:
Expand All @@ -9,7 +9,7 @@ env:
IMAGE_NAME: ${{ github.event.repository.name }}

jobs:
push_to_registry:
push_to_registry_dockerhub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
Expand All @@ -26,13 +26,14 @@ jobs:
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
tags: type=raw,value=latest
images: ${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
11 changes: 7 additions & 4 deletions .github/workflows/ghrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create and publish a Docker image
name: Publish Docker image (GHRC)

on:
push:
Expand All @@ -7,9 +7,10 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
USERNAME: ${{ github.actor }}

jobs:
build-and-push-image:
push_to_registry_ghrc:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -22,19 +23,21 @@ jobs:
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
username: ${{ env.USERNAME }}
password: ${{ secrets.TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=raw,value=latest
images: ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

*.secrets
*.env
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"cSpell.words": [
"dockerhub",
"ghrc",
"github",
"latin",
"roboto",
"Shopee"
Expand Down
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

![screenshot](./assets/screenshot.png)

![dockerhub workflow](https://github.com/Dpbm/shopee-entrega-padrao/actions/workflows/dockerhub.yml/badge.svg)
![ghrc workflow](https://github.com/Dpbm/shopee-entrega-padrao/actions/workflows/ghrc.yml/badge.svg)
![preview workflow](https://github.com/Dpbm/shopee-entrega-padrao/actions/workflows/preview.yml/badge.svg)
![production workflow](https://github.com/Dpbm/shopee-entrega-padrao/actions/workflows/production.yml/badge.svg)

Este projeto tem como finalidade ajudar você a descobrir quais são as possíveis transportadoras para a sua entrega da Shopee.

## Como executar
Expand Down