-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (37 loc) · 1.07 KB
/
release.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
name: Release
on:
push:
branches:
- main
jobs:
tag-and-release:
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag.outputs.new_tag }}
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCHES: main
publish:
needs: tag-and-release
runs-on: ubuntu-latest
# only run this job if the previous job created a new tag
if: needs.tag-and-release.outputs.new_tag != ''
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/maltekrupa/clamav-rest:latest, ghcr.io/maltekrupa/clamav-rest:${{needs.tag-and-release.outputs.new_tag}}