Skip to content

Commit

Permalink
set concurrency, token perms, env name
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHess committed Feb 7, 2024
1 parent 780359a commit cb58fab
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build-and-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_VERSION: '8.0'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Build and publish app
Expand Down Expand Up @@ -51,18 +59,19 @@ jobs:
run: dotnet publish src/NetCoreToolService/Steeltoe.NetCoreToolService.csproj -o publish

- name: Upload artifact for deployment job
if: github.event_name != 'PullRequest'
if: ${{ github.event_name != 'PullRequest' }}
uses: actions/upload-artifact@v4
with:
name: published-app
path: publish

deploy:
name: Deploy
environment: production
needs:
- build
runs-on: ubuntu-latest
if: github.event_name != 'PullRequest'
if: ${{ github.event_name != 'PullRequest' }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
Expand Down

0 comments on commit cb58fab

Please sign in to comment.