Skip to content

Commit 01d4d23

Browse files
committed
Add GH workflows to build and push Docker images
1 parent 28634ff commit 01d4d23

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Build deployment container
3+
on:
4+
push:
5+
branches:
6+
- prod
7+
- staging
8+
workflow_dispatch:
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-22.04
12+
name: Docker Push
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: docker build
16+
run: docker build . -t metacpan/metacpan-grep-front-end:$GITHUB_SHA
17+
- name: Log in to Docker Hub
18+
uses: docker/login-action@v2
19+
with:
20+
username: ${{ secrets.DOCKER_HUB_USER }}
21+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
22+
- name: push build to Docker Hub
23+
run: docker push metacpan/metacpan-grep-front-end:$GITHUB_SHA
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Build deployment container
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-22.04
11+
name: Docker Push
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: docker build
15+
run: docker build . -t metacpan/metacpan-grep-front-end:latest
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v2
18+
with:
19+
username: ${{ secrets.DOCKER_HUB_USER }}
20+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
21+
- name: Push build to Docker hub
22+
run: docker push metacpan/metacpan-grep-front-end:latest

0 commit comments

Comments
 (0)