chore: update apiserver ip after new control plane was installed in G… #207
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: Deploy | |
env: | |
IMAGE: docker.pkg.github.com/${{ github.repository }}/${{ github.event.repository.name }}:${{ github.sha }} | |
on: | |
push: | |
branches: | |
- master | |
release: | |
types: published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Build and publish Docker image | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
docker build . --pull --tag ${IMAGE} | |
echo "$GITHUB_TOKEN" | docker login --username "$GITHUB_REPOSITORY" --password-stdin https://docker.pkg.github.com | |
docker push ${IMAGE} | |
deploy-dev: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/master' && github.event_name != 'release' | |
strategy: | |
matrix: | |
cluster: ["dev-fss", "dev-gcp"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Deploy to ${{ matrix.cluster }} | |
uses: nais/deploy/actions/deploy@master | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_KEY }} | |
CLUSTER: ${{ matrix.cluster }} | |
RESOURCE: .nais/nais.yaml | |
deploy-prod: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'release' | |
strategy: | |
matrix: | |
cluster: ["prod-fss", "prod-gcp"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Deploy to ${{ matrix.cluster }} | |
uses: nais/deploy/actions/deploy@master | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_KEY }} | |
CLUSTER: ${{ matrix.cluster }} | |
RESOURCE: .nais/nais.yaml | |
deploy-prod-topic: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'release' | |
strategy: | |
matrix: | |
cluster: ["prod-gcp"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Deploy to ${{ matrix.cluster }} | |
uses: nais/deploy/actions/deploy@master | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_KEY }} | |
CLUSTER: ${{ matrix.cluster }} | |
RESOURCE: .nais/topic.yaml |