Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLAM-27: Fixing Deploy to Azure App Service permissions, faster Delete Latest Tag step #401

Merged
merged 32 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
182a908
Minimal deploy workflow to test tagging
Piedone Nov 22, 2024
0e64f49
Syntax
Piedone Nov 22, 2024
80d74cc
Removing unneeded step
Piedone Nov 22, 2024
f7cc97f
Don't fetch submodule tags when removing old latest tags
Piedone Nov 22, 2024
238ffdb
Trying a different bot e-mail
Piedone Nov 22, 2024
54aa82e
No need to checkout the submodules, to begin with
Piedone Nov 22, 2024
e5d655d
Mistaken remove
Piedone Nov 22, 2024
3dda1b9
Contents permission is optional
Piedone Nov 22, 2024
cc2b2c0
Simpler tagging
Piedone Nov 22, 2024
d7b3f63
Removing contents: read now from the correct workflow
Piedone Nov 22, 2024
8d48866
contents: write?
Piedone Nov 22, 2024
ae47da8
What if we don't have permissions?
Piedone Nov 22, 2024
71fb0b8
Docs
Piedone Nov 22, 2024
7501ccf
Maybe submodules are needed
Piedone Nov 22, 2024
0b31737
Revert "Maybe submodules are needed"
Piedone Nov 22, 2024
0732dd6
Revert "Trying a different bot e-mail"
Piedone Nov 22, 2024
fc1a2a2
Revert "Simpler tagging"
Piedone Nov 22, 2024
e82ae0f
Full workflow again
Piedone Nov 22, 2024
946e15a
Pointing GHA to issue branch
Piedone Nov 22, 2024
565a8ba
Submodules are needed, but not for tagging
Piedone Nov 22, 2024
22c66e7
Minimal workflow again
Piedone Nov 22, 2024
0387c89
Debug output
Piedone Nov 22, 2024
dadb782
Revert "Debug output"
Piedone Nov 22, 2024
c59fc0d
Trying a different bot e-mail
Piedone Nov 22, 2024
01bdf40
Reapply "Simpler tagging"
Piedone Nov 22, 2024
375573e
Trying a different bot e-mail in other workflows too
Piedone Nov 22, 2024
c42ee98
Full workflow
Piedone Nov 22, 2024
a576366
Removing trailing space
Piedone Nov 22, 2024
802b68b
Increasing post-pull-request-checks-automation default timeout
Piedone Nov 22, 2024
f43ec5d
Increasing MD linting timeout
Piedone Nov 22, 2024
f35edd5
Formatting
Piedone Nov 22, 2024
a49381f
Changing branches to dev
barthamark Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/remove-old-latest-tags/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ runs:
- name: Delete Latest Tag
shell: pwsh
run: |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'
git fetch --tags

git fetch --tags --no-recurse-submodules
$latestTag = (git tag --list '${{ inputs.tag-prefix }}/latest')

if ($latestTag)
{
git tag --delete '${{ inputs.tag-prefix }}/latest'
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/deploy-to-azure-app-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Deploy to Azure App Service
concurrency:
group: ${{ inputs.app-name }}AzureWorkflow

permissions:
id-token: write
contents: read

on:
workflow_call:
secrets:
Expand Down Expand Up @@ -267,9 +263,9 @@ jobs:
if: ${{ inputs.skip-update-latest-tag != 'true' }}
run: |
git tag '${{ inputs.tag-prefix }}/latest'
git push origin 'refs/tags/${{ inputs.tag-prefix }}/latest'
git push origin '${{ inputs.tag-prefix }}/latest'
git tag '${{ inputs.tag-prefix }}/${{ steps.create-timestamp.outputs.timestamp-tag }}'
git push origin 'refs/tags/${{ inputs.tag-prefix }}/${{ steps.create-timestamp.outputs.timestamp-tag }}'
git push origin '${{ inputs.tag-prefix }}/${{ steps.create-timestamp.outputs.timestamp-tag }}'

- name: Start Web App Slot
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ on:
default: \n
timeout-minutes:
type: number
default: 1
# Sometimes the job is slow to start, so we have to factor in that.
default: 3
description: Configuration for the timeout-minutes parameter of the workflow.

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/post-pull-request-checks-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ on:
default: merge
timeout-minutes:
type: number
default: 1
# Sometimes the job is slow to start, so we have to factor in that.
default: 3
description: Configuration for the timeout-minutes parameter of the workflow.
run-only-latest-workflow:
type: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swap-azure-web-app-slots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
throw 'Tag prefix not set, exiting'
}

git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'

$tagExists = (git tag --list '${{ inputs.swap-prefix }}/latest')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
git fetch origin ${{ inputs.merge-target }}
git checkout ${{ inputs.merge-target }}
# Setting the credentials is needed even with the --no-commit merge.
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
# Merge without taking any changes from the release branch.
git merge --strategy=ours --no-commit ${{ inputs.expected-ref }}
Expand Down
4 changes: 4 additions & 0 deletions Docs/Workflows/AzureHosting/DeployToAzureAppService.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ name: Deploy to Azure App Service
on:
workflow_dispatch:

permissions:
id-token: write
contents: write

jobs:
deploy-to-azure-app-service:
name: Deploy to Azure App Service
Expand Down