Skip to content

Commit

Permalink
workflow and docker updated to suggested best practice?
Browse files Browse the repository at this point in the history
  • Loading branch information
lianos committed Dec 14, 2023
1 parent dbec6a7 commit 69eb41a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-facielbio2.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# https://josephrodriguezg.medium.com/build-and-publish-docker-images-with-github-actions-78be3b3fbb9b
# https://github.com/docker/build-push-action
name: Build final facilebio image
# Using secrets:
# https://docs.docker.com/build/ci/github-actions/secrets/
name: facilebio final
on:
push:
branches:
Expand All @@ -19,12 +21,11 @@ on:
required: false
default: 'gitty up'
jobs:
build:
docker:
name: Build & push docker image
runs-on: ubuntu-latest
env:
IMG_NAME: facilebio/facilebio
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -47,11 +48,14 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push docker image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.IMG_NAME }}:latest
context: facilebio
secrets: |
GITHUB_PAT = GITHUB_PAT
"GITHUB_PAT=${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion facilebio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ dev:
sleep 5 && open http://localhost:8080

push:
docker push $(TAG):$(VERSION)
docker push $(tag)

0 comments on commit 69eb41a

Please sign in to comment.