Skip to content

Commit a3bf922

Browse files
committed
Build docker image and push to docker hub
1 parent c5925e4 commit a3bf922

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and publish docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build_and_push:
10+
runs-on: ubuntu-latest
11+
name: Builds the image and publishes to docker hub
12+
steps:
13+
- name: Check out the repo
14+
uses: actions/checkout@v2
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v1
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v1
21+
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Build and push
29+
id: docker_build
30+
uses: docker/build-push-action@v2
31+
with:
32+
push: true
33+
tags: phpdockerio/github-actions-delete-abandoned-branches:latest

0 commit comments

Comments
 (0)