Skip to content

feat: use automation flow instead of using bot to add issue to project #9

feat: use automation flow instead of using bot to add issue to project

feat: use automation flow instead of using bot to add issue to project #9

Workflow file for this run

name: Harvester Bot
on:
push:
branches:
- harvester
jobs:
build:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Fetch Git tags
run: git fetch --tags
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Read some Secrets
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: github-bot
file: github-bot/Dockerfile
push: true
tags: rancherlabs/harvester-github-bot:master
deploy:
needs: build
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Read some Secrets
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/kubectl/harvester/bot/credentials token | TOKEN ;
secret/data/github/repo/${{ github.repository }}/apiaddress/harvester/bot/credentials token | API_SERVER
- name: Install kubectl
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- name: Restart Deployment
run: |
kubectl rollout restart deployment -n github-bot github-bot --token=$TOKEN --server=$API_SERVER --insecure-skip-tls-verify
env:
TOKEN: ${{ env.TOKEN }}
API_SERVER_ADDR: ${{ env.API_SERVER }}