build(deps): bump Microsoft.Extensions.Options #91
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: 'Stratio.Extentions.Configuration.Vault' | |
on: | |
push: | |
branches-ignore: | |
- '*' | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- run: dotnet build | |
test: | |
runs-on: ubuntu-22.04 | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Start Vault container | |
run: docker run -d -p 8200:8200 --name vault hashicorp/vault:latest server -dev -dev-root-token-id=root | |
- name: Install Vault in runner | |
run: | | |
sudo apt update | |
sudo apt install -y wget gpg lsb-release libcap2-bin | |
sudo wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null | |
sudo echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
sudo apt update | |
sudo apt -y install vault || true | |
sudo apt-get -y install --reinstall vault | |
- name: Setup Vault | |
run: test/start_vault.sh | |
- name: Run tests | |
run: dotnet test | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Check Tag Pattern | |
run: | | |
if [[ "${{ github.ref }}" =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+ ]]; then | |
echo "Publishing tag ${{ github.ref }}" | |
else | |
echo "Skipping job as the tag does not match the pattern X.Y.Z" | |
exit 1 | |
fi | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Build | |
run: dotnet build | |
- name: Package | |
run: | | |
NUGET_VERSION=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///') | |
dotnet pack -o output_package /p:Version=$NUGET_VERSION | |
- name: Publish NuGet Package | |
run: dotnet nuget push output_package/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
pages: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Check Tag Pattern | |
run: | | |
if [[ "${{ github.ref }}" =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+ ]]; then | |
echo "Publishing tag ${{ github.ref }}" | |
else | |
echo "Skipping job as the tag does not match the pattern X.Y.Z" | |
exit 1 | |
fi | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Install Doxygen | |
run: sudo apt update && sudo apt install -y doxygen graphviz | |
- name: Build Doxyfile documentation | |
run: | | |
DOCKER_VERSION=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///') | |
(cat Doxyfile; echo "PROJECT_NUMBER=$DOCKER_VERSION") | doxygen - > /dev/null | |
- name: Configure Git | |
run: | | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Push documentation to gh-pages branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doxydocs/html |