Skip to content

Bump pyright from 1.1.358 to 1.1.367 #117

Bump pyright from 1.1.358 to 1.1.367

Bump pyright from 1.1.358 to 1.1.367 #117

Workflow file for this run

name: "ci"
on:
push:
tags:
- v*
branches:
- main
pull_request_target:
branches:
- main
workflow_dispatch:
env:
IMAGE_NAME: status-cake-exporter
jobs:
ci:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: "set up python"
uses: "actions/setup-python@v2"
with:
python-version: '3.10'
- name: "install poetry"
uses: "snok/install-poetry@v1"
with:
virtualenvs-in-project: true
- name: "install dependencies"
run: poetry install
- name: "get version"
id: "get_version"
run: |
current_version=$(poetry version -s)
echo "version=$current_version" >> $GITHUB_OUTPUT
- name: "build image"
run: |
docker build . --file Dockerfile --tag status-cake-exporter
- name: "log into registry"
if: github.repository_owner == 'chelnak'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: "push image"
if: github.repository_owner == 'chelnak'
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
if [[ "${{ github.ref }}" == "refs/tags/v"* ]]; then
docker tag $IMAGE_NAME $IMAGE_ID:$(echo $VERSION | sed -e 's/^v//')
# latest should always reflect the most recent tagged release
VERSION=latest
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
# main represents the latest build from main branch
VERSION=main
else
# dev represents the latest build from prs or branches
VERSION=dev
fi
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push -a $IMAGE_ID
- name: "Generate release notes"
if: startsWith(github.ref, 'refs/tags/v')
run: |
export GH_HOST=github.com
gh extension install chelnak/gh-changelog
gh changelog get --latest > LATEST.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "create release"
if: startsWith(github.ref, 'refs/tags/v')
run: |
gh release create v${{ steps.get_version.outputs.version }} --title v${{ steps.get_version.outputs.version }} -F LATEST.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}