-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 929 Bytes
/
deploy.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
name: Deploy docker image to private registry (if commit message contains ~deploy~)
on:
push:
branches:
- main
jobs:
docker:
name: Create docker image and push to private registry
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, '~deploy~')"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to registry
uses: docker/login-action@v2
with:
context: .
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_LOGIN }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ secrets.REGISTRY_URL }}/${{ github.event.repository.name }}:latest
env:
DOCKER_BUILDKIT: 1