4
4
push :
5
5
branches : [ main, release/v* ]
6
6
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9
+ cancel-in-progress : true
10
+
7
11
jobs :
8
12
nightly-binary :
9
13
runs-on : actuated-4cpu-8gb
51
55
AWS_REGION : ${{ secrets.AWS_REGION }}
52
56
SOURCE_DIR : dist/release
53
57
DEST_DIR : gitea/${{ steps.clean_name.outputs.branch }}
54
- nightly-docker :
58
+ nightly-docker-rootful :
55
59
runs-on : actuated-4cpu-8gb
56
60
steps :
57
61
- uses : actions/checkout@v3
@@ -75,13 +79,41 @@ jobs:
75
79
with :
76
80
username : ${{ secrets.DOCKERHUB_USERNAME }}
77
81
password : ${{ secrets.DOCKERHUB_TOKEN }}
82
+ - name : fetch go modules
83
+ run : make vendor
78
84
- name : build rootful docker image
79
85
uses : docker/build-push-action@v4
80
86
with :
81
87
context : .
82
88
platforms : linux/amd64,linux/arm64
83
89
push : true
84
90
tags : gitea/gitea:${{ steps.clean_name.outputs.branch }}
91
+ nightly-docker-rootless :
92
+ runs-on : actuated-4cpu-8gb
93
+ steps :
94
+ - uses : actions/checkout@v3
95
+ # fetch all commits instead of only the last as some branches are long lived and could have many between versions
96
+ # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
97
+ - run : git fetch --unshallow --quiet --tags --force
98
+ - uses : docker/setup-qemu-action@v2
99
+ - uses : docker/setup-buildx-action@v2
100
+ - name : Get cleaned branch name
101
+ id : clean_name
102
+ run : |
103
+ # if main then say nightly otherwise cleanup name
104
+ if [ "${{ github.ref }}" = "refs/heads/main" ]; then
105
+ echo "branch=nightly" >> "$GITHUB_OUTPUT"
106
+ exit 0
107
+ fi
108
+ REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
109
+ echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
110
+ - name : Login to Docker Hub
111
+ uses : docker/login-action@v2
112
+ with :
113
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
114
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
115
+ - name : fetch go modules
116
+ run : make vendor
85
117
- name : build rootless docker image
86
118
uses : docker/build-push-action@v4
87
119
with :
0 commit comments