More generic way of publishing docker image with all proper semVer tags #noissue
All checks were successful
/ build (push) Successful in 42s

This commit is contained in:
Varakh 2023-12-09 18:17:08 +01:00
parent b73b5ff751
commit 664a93822a
4 changed files with 27 additions and 3 deletions

6
.editorconfig Normal file
View file

@ -0,0 +1,6 @@
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

View file

@ -1,6 +1,7 @@
on: [push]
env:
REVISION: ${{ github.sha }}
IMAGE_TAG: varakh/hetzner-storagebox-exporter
jobs:
build:
runs-on: docker
@ -28,4 +29,5 @@ jobs:
uses: docker/build-push-action@v4
with:
push: false
tags: varakh/hetzner-storagebox-exporter:${{ github.sha }}
tags: |
${{ env.IMAGE_TAG }}:${{ github.sha }}

View file

@ -4,6 +4,10 @@ on:
- master
env:
REVISION: ${{ github.sha }}
IMAGE_TAG: varakh/hetzner-storagebox-exporter
VERSION_MAJOR: 1
VERSION_MINOR: 0
VERSION_PATCH: 0
jobs:
build:
runs-on: docker
@ -31,4 +35,8 @@ jobs:
uses: docker/build-push-action@v4
with:
push: true
tags: varakh/hetzner-storagebox-exporter:latest
tags: |
${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}
${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}
${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }}
${{ env.IMAGE_TAG }}:latest

View file

@ -3,6 +3,10 @@ on:
- cron: "0 0 1 * *"
env:
REVISION: ${{ github.sha }}
IMAGE_TAG: varakh/hetzner-storagebox-exporter
VERSION_MAJOR: 1
VERSION_MINOR: 0
VERSION_PATCH: 0
jobs:
build:
runs-on: docker
@ -30,4 +34,8 @@ jobs:
uses: docker/build-push-action@v4
with:
push: true
tags: varakh/hetzner-storagebox-exporter:latest
tags: |
${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}
${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}
${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }}
${{ env.IMAGE_TAG }}:latest