-
Notifications
You must be signed in to change notification settings - Fork 456
43 lines (42 loc) · 1.35 KB
/
image-build-vue-storefront-cloud.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
name: Docker registry image build job
on:
workflow_call:
inputs:
DOCKER_NAMESPACE:
required: true
type: string
ARTIFACT_TYPE:
required: true
type: string
DOCKERFILE_PATH:
required: true
type: string
ENVIRONMENT:
required: true
type: string
TARGET_DOMAIN:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup deployment environments variables
shell: bash
run: |
cat .github/workflows/public_env_info/${{ inputs.ENVIRONMENT }}_docs.txt >> $GITHUB_ENV
- name: Build and publish docker image
uses: elgohr/Publish-Docker-Github-Action@v5
env:
ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
TARGET_DOMAIN: ${{ inputs.TARGET_DOMAIN }}
with:
name: ${{ inputs.DOCKER_NAMESPACE }}/${{ inputs.ARTIFACT_TYPE }}:${{ github.sha }}
registry: registry.storefrontcloud.io
username: ${{ secrets.CLOUD_USERNAME }}
password: ${{ secrets.CLOUD_PASSWORD }}
dockerfile: ${{ inputs.DOCKERFILE_PATH }}
buildoptions: '--compress'
buildargs: VITE_DOCS_BASEPATH,VITE_DOCS_EXAMPLES_REACT_PATH,VITE_DOCS_EXAMPLES_VUE_PATH,ENVIRONMENT,TARGET_DOMAIN