forked from ytgov/signing-authority
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.08 KB
/
docker-publish.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
name: Build and Push
on:
push:
branches: [main, test, uat]
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate release tag
id: generate_release_tag
uses: amitsingh-007/next-release-tag@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
tag_template: "yyyy.mm.dd.i"
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.generate_release_tag.outputs.next_release_tag }}
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}