-
-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (45 loc) · 1.37 KB
/
release.yaml
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
51
52
name: Go
on:
push:
branches:
- master
jobs:
build:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1
id: go
- name: Build
run: |
make docker
- name: release
env:
X: Y
env:
# I couldn't get the releases to work with the GITHUB_TOKEN so made secrets... :(
# GH_DEPLOY_USER: ${{ secrets.GH_DEPLOY_USER }}
# GH_DEPLOY_KEY: ${{ secrets.GH_DEPLOY_KEY }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
IMAGE: treeder/bump
run: |
git fetch --tags
git tag
git config --global user.email "treeder+github@gmail.com"
git config --global user.name "Github Action"
wget -O - https://raw.githubusercontent.com/treeder/bump/master/gitbump.sh | bash
version=$(git tag --sort=-refname --list "v[0-9]*" | head -n 1)
echo "new version $version"
# docker it
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker tag $IMAGE:latest $IMAGE:$version
docker push $IMAGE:latest
docker push $IMAGE:$version
docker push ghcr.io/treeder/bump:latest
docker push ghcr.io/treeder/bump:$version