Skip to content

Commit

Permalink
Ajustes e melhorias
Browse files Browse the repository at this point in the history
  • Loading branch information
fosouzadev committed Nov 16, 2024
1 parent 5aada6f commit 134acaf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/github-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ jobs:
- name: Log in to GitHub Container Registry
run: echo ${{ secrets.PAT_DOCKER_IMAGES }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin

#- name: Set environment variable
# run: echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> $GITHUB_ENV

- name: Build docker image
run: make build DB_PASSWORD=${{ secrets.DB_PASSWORD }}
run: make build DB_PASSWORD=${{ secrets.DB_PASSWORD }} GITHUB_USER=${{ github.actor }}

- name: Publish docker image
run: make publish
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ docker run -d --name postgresql-docker-build -p 5432:5432 -v pgdata:/var/lib/pos
No fluxo do github actions o arquivo `makefile` é utilizado, para que após adicionar novos scripts ao repositório seja definida também a nova tag da imagem.
```
make build
```

## Baixar imagem do Github Packages
```
echo {token} | docker login ghcr.io -u {usuário do github} --password-stdin
docker pull ghcr.io/{usuário do github}/{imagem}:{tag}
```
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGE_NAME=ghcr.io/fosouzadev/postgresql-container
IMAGE_NAME=ghcr.io/$(GITHUB_USER)/postgresql-container
TAG=1.0

build:
Expand Down

0 comments on commit 134acaf

Please sign in to comment.