-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1001 Bytes
/
cicd.yaml
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
name: Build and public image
on:
release:
types:
- published
jobs:
push_to_registry:
name: Push Docker to repository
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/[email protected]
- name: Log in to artifact storage
uses: docker/[email protected]
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_IMAGE }}
- name: Build and push Docker image
id: push
uses: docker/[email protected]
with:
context: .
file: ./dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}