v1.15.39 #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Push to GitHub Packages | |
uses: docker/build-push-action@v1 | |
with: | |
username: leaq-ru | |
password: ${{ secrets.GH_CI_TOKEN }} | |
registry: ghcr.io | |
repository: ${{ github.repository }} | |
tag_with_ref: true | |
- name: Extract service name | |
uses: bluwy/substitute-string-action@v1 | |
id: substr | |
with: | |
_input-text: ${{ github.repository }} | |
leaq-ru/: '' | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DIGITALOCEAN_CI_TOKEN }} | |
- name: Save DigitalOcean kubeconfig | |
run: doctl kubernetes cluster kubeconfig save k8s | |
- name: Update deployment file | |
run: sed -i 's|busybox|ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}|' $GITHUB_WORKSPACE/config/deployment.yml | |
- name: Apply deployment | |
run: kubectl -n leaq apply -f ${{ github.workspace }}/config/deployment.yml | |
- name: Verify deployment | |
run: kubectl -n leaq rollout status deployment/web |