-
Notifications
You must be signed in to change notification settings - Fork 57
42 lines (34 loc) · 989 Bytes
/
Copy pathbuild-docker.yml
File metadata and controls
42 lines (34 loc) · 989 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
33
34
35
36
37
38
39
40
41
42
name: 'Build Docker'
on:
push:
branches:
- master
permissions:
contents: read
env:
IMAGE_NAME: gorules/editor
jobs:
docker_sass:
name: 'Build Docker'
if: "startsWith(github.event.head_commit.message, 'chore(release)')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Package version
id: version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{steps.version.outputs.current-version}}