Skip to content

Commit 686b3e0

Browse files
committed
docker autobuild
1 parent c1906fc commit 686b3e0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build_push.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Publish Docker image
11+
12+
on:
13+
release:
14+
types: [published]
15+
workflow_dispatch:
16+
17+
jobs:
18+
push_to_registry:
19+
name: Push Docker image to Docker Hub
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check out the repo
23+
uses: actions/checkout@v3
24+
25+
- name: Log in to Docker Hub
26+
uses: docker/login-action@v2
27+
with:
28+
username: ${{ secrets.DOCKER_USERNAME }}
29+
password: ${{ secrets.DOCKER_PASSWORD }}
30+
31+
32+
- name: Build and push Docker image
33+
uses: docker/build-push-action@v3
34+
with:
35+
context: .
36+
push: true
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)