medaltimes:manage only allows managing own medal times #39
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: CI | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: ${{ (github.head_ref || github.ref_name) == 'main' }} | |
environment: tm-medals.danonthemoon.dev | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: api | |
push: true | |
tags: danonthemoon/tm-medals-api:latest | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
- name: Helm Upgrade | |
shell: bash | |
run: | | |
doctl kubernetes cluster kubeconfig save --expiry-seconds 240 ${{ secrets.DIGITALOCEAN_CLUSTER_NAME }} | |
helm dependency update ./helm/tm-medals | |
helm -n tm-medals upgrade --install --wait --timeout 60s --atomic tm-medals ./helm/tm-medals/ |