Skip to content

Commit 4be202c

Browse files
committed
Try docker/build-push-action@v2
1 parent 7a74868 commit 4be202c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/deploy-staging.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Deploy to staging
2+
environment: staging
23
on:
34
push:
45
branches:
@@ -10,12 +11,20 @@ jobs:
1011
steps:
1112
- name: Check out the repo
1213
uses: actions/checkout@v2
13-
- name: Push to Docker Hub
14-
uses: docker/build-push-action@v1
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
- name: Login to Docker Hub
17+
uses: docker/login-action@v1
1518
with:
1619
username: ${{ secrets.DOCKER_USERNAME }}
1720
password: ${{ secrets.DOCKER_PASSWORD }}
18-
repository: ${{ secrets.DOCKER_USERNAME }}/p5.js-web-editor-staging
19-
tag_with_ref: true
21+
- name: Build and push to Docker Hub
22+
uses: docker/build-push-action@v2
23+
with:
24+
context: .
25+
file: ./Dockerfile
26+
pull: true
27+
push: true
28+
tags: ${{ secrets.DOCKER_USERNAME }}/p5.js-web-editor-staging:${{ GITHUB_SHA }}
2029
target: production
2130

0 commit comments

Comments
 (0)