mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 16:19:49 +00:00
Update docker-build.yml
This commit is contained in:
39
.github/workflows/docker-build.yml
vendored
39
.github/workflows/docker-build.yml
vendored
@@ -18,11 +18,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
|
REGISTRY: ghcr.io
|
||||||
GKE_CLUSTER: cluster-1 # TODO: update to cluster name
|
IMAGE_NAME: abouhuolia/bigcapital-client
|
||||||
GKE_ZONE: us-central1-c # TODO: update to cluster zone
|
|
||||||
DEPLOYMENT_NAME: gke-test # TODO: update to deployment name
|
|
||||||
IMAGE: static-site
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup-build-publish-deploy:
|
setup-build-publish-deploy:
|
||||||
@@ -34,12 +31,28 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# Build the Docker image
|
# Login to Container registry.
|
||||||
- name: Build
|
- name: Log in to the Container registry
|
||||||
run: |-
|
uses: docker/login-action@v1
|
||||||
docker build -t abouhuolia/bigcapital-client:latest .
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
# Builds and push the Docker image.
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: bigcapitalhq/server:latest
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Push the Docker image to Google Container Registry
|
|
||||||
- name: Publish
|
|
||||||
run: |-
|
|
||||||
docker push "gcr.io/$PROJECT_ID/$IMAGE:$GITHUB_SHA"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user