Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Update README.md

Update README.md #107

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
tags:
- 'v*'
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip3 install build
- run: python3 -m build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/**
if-no-files-found: error
retention-days: 5
lint:
runs-on: ubuntu-latest
name: Linting
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: "openvpn_auth_azure_ad"
use-pylint: false
use-isort: false
use-mypy: false
docker:
runs-on: ubuntu-latest
name: Docker
needs:
- build
- lint
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: jkroepke/openvpn-auth-azure-ad
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
publish:
name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- build
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
release:
name: Create release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- publish
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, 'rc') }}
body: |-
# CHANGELOG
* https://github.com/jkroepke/openvpn-auth-azure-ad/blob/${{ github.ref_name }}/CHANGELOG.md
## DockerHub
* https://hub.docker.com/r/jkroepke/openvpn-auth-azure-ad/tags?name=${{ github.ref_name }}