Skip to content

Commit c346fce

Browse files
committed
ADDED: ci for docker build and push to docker hub
1 parent f42ecbc commit c346fce

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: ci
2+
3+
# Trigger event on every push / delete event, no matter the branch
4+
# on: [push, delete]
5+
6+
# Trigger event on every push / delete event, only in master branch
7+
on:
8+
push:
9+
branches:
10+
- "master"
11+
delete:
12+
branches:
13+
- "master"
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
-
20+
name: Checkout
21+
uses: actions/checkout@v3
22+
-
23+
name: Login to Docker Hub
24+
uses: docker/login-action@v2
25+
with:
26+
username: ${{ secrets.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_TOKEN }}
28+
-
29+
name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v2
31+
-
32+
name: Build and push
33+
uses: docker/build-push-action@v4
34+
with:
35+
context: .
36+
file: ./Dockerfile
37+
push: true
38+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/github-backup:latest
39+
40+

0 commit comments

Comments
 (0)