-
Notifications
You must be signed in to change notification settings - Fork 445
45 lines (39 loc) · 1.08 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Docker Image CI
env:
TAG: 'latest'
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
name: Build image
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Build and push on grandnode2
uses: docker/build-push-action@v2
with:
context: .
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref_name }}
push: true
tags: grandnode/grandnode2:${{ env.TAG }}
- name: Build and push on develop
uses: docker/build-push-action@v2
with:
context: .
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref_name }}
push: true
tags: grandnode/develop:${{ env.TAG }}