-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.39 KB
/
go.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
46
47
48
49
50
name: Go
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build & Push docker image
id: build_docker
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{github.repository}}
push: true
tag_with_ref: true
add_git_labels: true
- name: Create Release
id: create_release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.${{ github.run_number }}
release_name: Release v1.0.${{ github.run_number }}
body: |
Samba config kube pvc v1.0.${{ github.run_number }}
draft: false
prerelease: false
- name: Push docker image release
id: push_docker_release
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{github.repository}}
push: true
tags: v1.0.${{ github.run_number }}
add_git_labels: true