File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Redeploy Docker Image
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ paths-ignore :
7+ - ' *.md'
8+ - ' .github/workflows/**'
9+
10+ # Allows for manually running this workflow from the Actions tab
11+ workflow_dispatch :
12+
13+ jobs :
14+ build-push-redeploy :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v2
19+ - name : Build and Push Docker Image
20+ run : |
21+ echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin docker-registry.ebrains.eu
22+ docker build -t docker-registry.ebrains.eu/ebrains-data-curation/metadata-wizard:${{ github.sha }} .
23+ docker push docker-registry.ebrains.eu/ebrains-data-curation/metadata-wizard:${{ github.sha }}
24+ - name : Write Kubeconfig to File
25+ run : |
26+ mkdir -p ${{ runner.temp }}/.kube
27+ echo "${{ secrets.KUBE_CONFIG }}" > ${{ runner.temp }}/.kube/kubeconfig.yaml
28+ - name : Update Kubernetes Deployment
29+ env :
30+ KUBECONFIG : ${{ runner.temp }}/.kube/kubeconfig.yaml
31+ run : |
32+ kubectl set image deployment/metadata-wizard container-0=docker-registry.ebrains.eu/ebrains-data-curation/metadata-wizard:${{ github.sha }} --namespace=metadata-wizard
33+
You can’t perform that action at this time.
0 commit comments