-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (28 loc) · 944 Bytes
/
publish.yaml
File metadata and controls
32 lines (28 loc) · 944 Bytes
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
name: publish
on:
push:
tags:
- v*
jobs:
build-publish-docker-images:
runs-on: ubuntu-latest
steps:
- name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- uses: actions/checkout@v2
- run: |
git fetch --tags
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker images
env:
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
run: |
docker build --tag "ghcr.io/kazanexpress/${{ github.event.repository.name }}:$SOURCE_TAG" --tag "ghcr.io/kazanexpress/${{ github.event.repository.name }}:latest" .
docker push --all-tags ghcr.io/kazanexpress/${{ github.event.repository.name }}