Skip to content

Update codacy.yml

Update codacy.yml #34

Workflow file for this run

name: Publish Pre-Release Nugets and Docker
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
jobs:
build:
name: "Publish Pre-Release Nugets and Docker"
env:
ASPNETCORE_ENVIRONMENT: "Production"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Install NET 9
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '9.0.x'
- name: Restore Nuget Packages
run: dotnet restore MobileConfiguration.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
- name: Build Code
run: dotnet build MobileConfiguration.sln --configuration Release
- name: 'Get Previous tag'
id: get-latest-tag
uses: actions-ecosystem/action-get-latest-tag@v1
with:
semver_only: true
- name: 'Bump Version'
id: bump-semver
uses: actions-ecosystem/action-bump-semver@v1
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: patch
- name: Print Version
id: next_version
run: echo ::set-output name=VERSION::${{ steps.bump-semver.outputs.new_version }}-build$GITHUB_RUN_NUMBER
- name: Publish Images to Docker Hub
run: |
docker build . --file MobileConfiguration/Dockerfile --tag stuartferguson/mobileconfiguration:master
docker login --username=${{ secrets.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
docker push stuartferguson/mobileconfiguration:master
buildwidows:
name: "Publish Pre-Release Docker for Windows"
env:
ASPNETCORE_ENVIRONMENT: "Production"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Publish Windows Images to Docker Hub
run: |
docker build . --file MobileConfiguration/Dockerfilewindows --tag stuartferguson/mobileconfigurationwindows:master
docker login --username=${{ secrets.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
docker push stuartferguson/mobileconfigurationwindows:master