Update workflow
Some checks failed
Build And Publish / BuildAndPublish (push) Failing after 1m40s

This commit is contained in:
r-freeman 2024-08-23 15:20:51 +01:00
parent 722894ec4f
commit 025daa2955
2 changed files with 29 additions and 8 deletions

View File

@ -1,3 +1,4 @@
node_modules
.git
.next
.next
.env

View File

@ -32,13 +32,33 @@ jobs:
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{secrets.DOCKER_HUB_USERNAME}}/portfolio:v1
# - name: Build and push Docker image
# uses: https://github.com/docker/build-push-action@v6
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: ${{secrets.DOCKER_HUB_USERNAME}}/portfolio:v1
- name: Build Docker image
run: |
docker build --secret id=SPOTIFY_CLIENT_ID,src=.env \
--secret id=SPOTIFY_CLIENT_SECRET,src=.env \
--secret id=SPOTIFY_REFRESH_TOKEN,src=.env \
--secret id=NEXT_PUBLIC_SITE_URL,src=.env \
--secret id=GITHUB_ACCESS_TOKEN,src=.env \
--secret id=GITHUB_USERNAME,src=.env \
--secret id=GITHUB_CLIENT_ID,src=.env \
--secret id=GITHUB_SECRET,src=.env \
--secret id=NEXT_PUBLIC_SUPABASE_URL,src=.env \
--secret id=NEXT_PUBLIC_SUPABASE_ANON_KEY,src=.env \
--secret id=SUPABASE_SERVICE_ROLE_KEY,src=.env \
-t ${{secrets.DOCKER_HUB_USERNAME}}/portfolio:v1 \
.
- name: Push the Docker image
run: |
docker image push ${{secrets.DOCKER_HUB_USERNAME}}/portfolio:v1
- name: Stop the docker container
continue-on-error: true