-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: add github actions workflow and versioning
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and publish docker image | ||
|
||
# Controls when the workflow will run | ||
on: | ||
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | ||
repository_dispatch: | ||
types: [build-publish] | ||
|
||
jobs: | ||
build-publish: | ||
runs-on: ubuntu-latest # The type of runner that the job will run on | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | ||
|
||
- name: Set version | ||
uses: dotnet/[email protected] | ||
id: nbgv | ||
with: | ||
setAllVars: false | ||
|
||
- name: Build and Publish as versioned | ||
uses: VaultVulp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages | ||
image-name: ositemindex.api # Provide only Docker image name, tag will be automatically set to latest | ||
image-tag: ${{ steps.nbgv.outputs.SimpleVersion }} | ||
|
||
- name: Build and Publish as latest | ||
uses: VaultVulp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages | ||
image-name: ositemindex.api # Provide only Docker image name, tag will be automatically set to latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", | ||
"version": "1.0", | ||
"publicReleaseRefSpec": [ | ||
"^refs/heads/master$", | ||
"^refs/heads/v\\d+(?:\\.\\d+)?$" | ||
], | ||
"cloudBuild": { | ||
"buildNumber": { | ||
"enabled": true | ||
} | ||
} | ||
} |