-
-
Notifications
You must be signed in to change notification settings - Fork 80
48 lines (40 loc) · 1.45 KB
/
deploy-docker-to-hub.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
name: Deploy latest docker image build to hub
on:
# push:
# branches:
# - main
workflow_dispatch:
inputs:
image:
description: 'Enter the latest image tag'
required: true
jobs:
deploy-docker-to-hub:
runs-on: ubuntu-latest
if: |
${{ github.ref == 'refs/heads/main' }} &&
${{ github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: refs/heads/main
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set environment variables
run: |
ls
pwd
cp .env.example .env
cp packages/backend/.env.example packages/backend/.env
cp packages/client/.env.example packages/client/.env
cp packages/js/.env.example packages/js/.env
cp packages/react/.env.example packages/react/.env
cp packages/vue/.env.example packages/vue/.env
- name: Build docker images
run: docker-compose build --no-cache
- name: Push docker images to docker hub
run: docker-compose push