Should make auto building and pushing work.
This commit is contained in:
1 parent
90c57451a7
commit
6783d96fdc
1 file changed
+9
-11
@@ -12,15 +12,6 @@ on:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
login:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
@@ -30,7 +21,7 @@ jobs:
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v2.1.4
|
||||
|
||||
@@ -40,10 +31,17 @@ jobs:
|
||||
# Runs a single command using the runners shell
|
||||
- name: use react-scripts to create optimized build
|
||||
run: npm run build
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
# uses: docker/build-push-action@4a531fa5a603bab87dfa56578bd82b28508c9547
|
||||
uses: docker/build-push-action@v2.2.2
|
||||
with:
|
||||
file: $GITHUB_WORKSPACE/Dockerfile
|
||||
push: true
|
||||
push: true
|
||||
tags: lucasw89/portfolio:latest
|
||||
Reference in new issue
Block a user