Compare commits
No commits in common. "v0.0.17" and "main" have entirely different histories.
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@ -10,7 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
@ -21,12 +21,6 @@ jobs:
|
||||
id: get_version
|
||||
uses: battila7/get-version-action@v2.0.0
|
||||
|
||||
- name: install buildx
|
||||
id: buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v1
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Docker Login
|
||||
# You may pin to the exact commit or the version.
|
||||
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
@ -44,21 +38,20 @@ jobs:
|
||||
env:
|
||||
IMAGE_TAG: ${{ steps.get_version.outputs.version-without-v }}
|
||||
run: |
|
||||
docker buildx build --push \
|
||||
--tag ${{ secrets.DR_URL }}/snowflake-server:$IMAGE_TAG \
|
||||
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
||||
docker build -t ${{ secrets.DR_URL }}/snowflake-server:$IMAGE_TAG .
|
||||
docker push ${{ secrets.DR_URL }}/snowflake-server:$IMAGE_TAG
|
||||
sed -i 's|<IMAGE>|${{ secrets.DR_URL }}/snowflake-server:'${IMAGE_TAG}'|' $GITHUB_WORKSPACE/deployment.yml
|
||||
|
||||
- name: Update deployment file
|
||||
run: TAG=${{ steps.get_version.outputs.version-without-v }} && sed -i 's|<IMAGE>|${{ secrets.DR_URL }}/snowflake-server:'${TAG}'|' $GITHUB_WORKSPACE/deployment.yml
|
||||
- name: Kubectl tool installer
|
||||
uses: Azure/setup-kubectl@v1
|
||||
|
||||
- uses: azure/k8s-set-context@v1
|
||||
- name: Kubernetes set context
|
||||
uses: Azure/k8s-set-context@v1.1
|
||||
with:
|
||||
# Acceptable values: kubeconfig or service-account or service-principal
|
||||
method: kubeconfig
|
||||
# Kubernetes Config
|
||||
kubeconfig: ${{ secrets.KUBE_CONFIG }}
|
||||
id: setcontext
|
||||
|
||||
- name: Deploy to Kubernetes
|
||||
run: kubectl apply -f $GITHUB_WORKSPACE/deployment.yml
|
||||
|
||||
- name: Verify deployment
|
||||
run: kubectl rollout status deployment/snowflake-server
|
||||
|
||||
@ -2,7 +2,7 @@ kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: snowflake-server
|
||||
namespace: snowflake
|
||||
namespace: default
|
||||
labels:
|
||||
environment: production
|
||||
spec:
|
||||
@ -25,7 +25,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: snowflake-server
|
||||
namespace: snowflake
|
||||
namespace: default
|
||||
labels:
|
||||
app: snowflake-server
|
||||
spec:
|
||||
@ -56,4 +56,4 @@ spec:
|
||||
name: snowflake
|
||||
key: worker_id
|
||||
imagePullSecrets:
|
||||
- name: registry-2
|
||||
- name: regcred
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user