Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MattJeanes authored Jun 1, 2020
1 parent 6978b97 commit 08b94d5
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Tag name
id: tag_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Build and push Docker images
uses: docker/build-push-action@v1
Expand Down Expand Up @@ -68,11 +73,21 @@ jobs:
resource-group: ${{ secrets.KUBERNETES_AZURE_RESOURCEGROUPNAME }}
cluster-name: ${{ secrets.KUBERNETES_AZURE_CLUSTERNAME }}
if: startsWith(github.ref, 'refs/tags/')


- name: Replace tokens
uses: cschleiden/replace-tokens@v1.0
with:
tokenPrefix: '{{'
tokenSuffix: '}}'
files: ./kube-deploy.yml
env:
connectionString: ${{ secrets.KUBERNETES_CONNECTIONSTRING }}
if: startsWith(github.ref, 'refs/tags/')

- name: Deploy to Kubernetes cluster
uses: Azure/k8s-deploy@v1
with:
namespace: ${{ secrets.KUBERNETES_NAMESPACE }}
manifests: ./kube-deploy.yml
images: 'mattjeanes/teslamateagile:${{ github.ref }}'
images: 'mattjeanes/teslamateagile:${{ steps.tag_name.outputs.SOURCE_TAG }}'
if: startsWith(github.ref, 'refs/tags/')

0 comments on commit 08b94d5

Please sign in to comment.