forked from egorky/chatwoot
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (62 loc) · 1.93 KB
/
publish_foss_docker.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# #
# # This action will publish Chatwoot CE docker image.
# # This is set to run against merges to develop, master
# # and when tags are created.
# #
name: Publish Chatwoot CE docker images for AMD64
on:
push:
branches:
- develop
- master
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE_NAME: wkarts/hub
GIT_REF: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Cache Yarn
# uses: actions/cache@v3
# with:
# path: /yarn-cache
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
- name: Make custom changes
run: |
sed -i 's/"name": "Teste"/"name": "🅷🆄🅱"/g' public/manifest.json
sed -i 's/"short_name": "Teste"/"short_name": "🅷🆄🅱"/g' public/manifest.json
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Set up Docker tags
id: docker_tag
run: |
echo "TAGS=${IMAGE_NAME}:${GIT_REF}" >> $GITHUB_ENV
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "LATEST_TAG=${IMAGE_NAME}:latest" >> $GITHUB_ENV
fi
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push amd64 image
uses: docker/[email protected]
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ env.TAGS }}
${{ env.LATEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max