Update dependencies and python version and switch to ghcr #40
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: Publish new release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
name: Create new release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push image to GitHub Container Registry | |
env: | |
GITHUB_REF: ${{ github.ref }} | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/opsbot | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
TAG=${GITHUB_REF//refs\/tags\/v} | |
docker build . -t $IMAGE_ID:$TAG --push | |
- name: Prepare helm chart | |
env: | |
GITHUB_REF: ${{ github.ref }} | |
run: | | |
sed -i 's/0.0.1/'"${GITHUB_REF//refs\/tags\/v}"'/' deploy/helm/opsbot/Chart.yaml | |
sed -i 's/0.0.1/'"${GITHUB_REF//refs\/tags\/v}"'/' deploy/helm/opsbot/values.yaml | |
- name: Publish helm chart | |
uses: stefanprodan/helm-gh-pages@master | |
with: | |
charts_dir: deploy/helm | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false |