-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (45 loc) · 1.84 KB
/
main.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
51
52
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@master
- name: Get version tag
id: get_tag
run: |
echo "tag=${GITHUB_REF:10}" >>$GITHUB_OUTPUT
if [ ${{ endsWith(github.ref, '-lts') }} = true ]; then
echo "tag_latest=latest-lts" >>$GITHUB_OUTPUT
# Branch of JSON schema files to include
TAG=${GITHUB_REF:11}
echo "branch=${TAG/.[0-9]-lts/-lts}" >>$GITHUB_OUTPUT
else
echo "tag_latest=latest" >>$GITHUB_OUTPUT
# Branch of JSON schema files to include
echo "branch=master" >>$GITHUB_OUTPUT
fi
- name: Build and publish docker image without qgis
uses: elgohr/Publish-Docker-Github-Action@v5
if: github.event_name != 'pull_request'
env:
BRANCH: "${{ steps.get_tag.outputs.branch }}"
with:
name: sourcepole/${{ github.event.repository.name }}
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
dockerfile: Dockerfile-noqgis
buildargs: BRANCH
tags: "${{ steps.get_tag.outputs.tag }}-noqgis,${{ steps.get_tag.outputs.tag_latest }}-noqgis"
- name: Build and publish docker image
uses: elgohr/Publish-Docker-Github-Action@v5
if: github.event_name != 'pull_request'
env:
BRANCH: "${{ steps.get_tag.outputs.branch }}"
with:
name: sourcepole/${{ github.event.repository.name }}
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
buildargs: BRANCH
tags: "${{ steps.get_tag.outputs.tag }},${{ steps.get_tag.outputs.tag_latest }}"