This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
Bump docker/login-action from 2 to 3 (#137) #37
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: Update website | |
on: | |
push: | |
branches: development | |
jobs: | |
update-website: | |
runs-on: ubuntu-latest | |
if: github.repository == 'Mudlet/mudlet-package-repo' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image and push to Dockerhub | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/mudlet/mudlet-package-repo:development | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
- name: Delete old cluster deployment | |
uses: steebchen/kubectl@master | |
env: | |
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | |
KUBECTL_VERSION: "1.19" | |
with: | |
args: delete deployment package-repo | |
- name: Deploy new cluster | |
uses: steebchen/kubectl@master | |
env: | |
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | |
KUBECTL_VERSION: "1.19" | |
with: | |
args: apply -f kube | |
- name: Verify deployment | |
uses: steebchen/kubectl@master | |
env: | |
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | |
KUBECTL_VERSION: "1.19" | |
with: | |
args: '"rollout status deployment/package-repo"' |