-
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.
Merge pull request #5 from Altinn/#722_Update_github_actions
#722: Rewrite of action + prod action
- Loading branch information
Showing
3 changed files
with
94 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,47 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy feedpoller-func to production | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
DOTNET_VERSION: '6.0.x' # set this to the dotnet version to use | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
environment: Production | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Skriv ut GitHub metadata | ||
run: | | ||
echo "Repo: $GITHUB_REPOSITORY" | ||
echo "Branch: $GITHUB_REF_NAME" | ||
echo "Commit SHA: $GITHUB_SHA" | ||
echo "Actor: $GITHUB_ACTOR" | ||
echo "Run #: $GITHUB_RUN_NUMBER" | ||
- name: Set up .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
include-prerelease: true | ||
|
||
- name: dotnet publish | ||
run: dotnet publish -c Release -o "${{env.GITHUB_WORKSPACE}}\myapp" | ||
|
||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: deploy-to-function | ||
with: | ||
app-name: 'oed-test-feedpoller-func' | ||
slot-name: 'Production' | ||
package: "${{env.GITHUB_WORKSPACE}}\\myapp" | ||
publish-profile: ${{ secrets.PUBLISH_PROFILE }} |
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,47 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy feedpoller-func to test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
DOTNET_VERSION: '6.0.x' # set this to the dotnet version to use | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
environment: Test | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Skriv ut GitHub metadata | ||
run: | | ||
echo "Repo: $GITHUB_REPOSITORY" | ||
echo "Branch: $GITHUB_REF_NAME" | ||
echo "Commit SHA: $GITHUB_SHA" | ||
echo "Actor: $GITHUB_ACTOR" | ||
echo "Run #: $GITHUB_RUN_NUMBER" | ||
- name: Set up .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
include-prerelease: true | ||
|
||
- name: dotnet publish | ||
run: dotnet publish -c Release -o "${{env.GITHUB_WORKSPACE}}\myapp" | ||
|
||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: deploy-to-function | ||
with: | ||
app-name: 'oed-test-feedpoller-func' | ||
slot-name: 'Production' | ||
package: "${{env.GITHUB_WORKSPACE}}\\myapp" | ||
publish-profile: ${{ secrets.PUBLISH_PROFILE }} |