1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

update ::set-output to latest (#2470)

* update ::set-output to latest

* update workflow for linter error
This commit is contained in:
Opeyemi 2022-12-05 16:12:42 +00:00 committed by GitHub
parent a6a5a734c2
commit f3b4363440
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 22 deletions

View File

@ -245,7 +245,7 @@ jobs:
PROJECT_NAME=$(echo "${{ matrix.project_name }}" | awk '{print tolower($0)}')
echo "Matrix name: ${{ matrix.project_name }}"
echo "PROJECT_NAME: $PROJECT_NAME"
echo "::set-output name=project_name::$PROJECT_NAME"
echo "project_name=$PROJECT_NAME" >> $GITHUB_OUTPUT
- name: Get build artifact
if: ${{ matrix.dotnet }}

View File

@ -42,9 +42,9 @@ jobs:
for file in $MODIFIED_FILES
do
if [[ $file == *"${{ matrix.path }}"* ]]; then
echo "::set-output name=changes_detected::true"
echo "changes_detected=true" >> $GITHUB_OUTPUT
break
else echo "::set-output name=changes_detected::false"
else echo "changes_detected=false" >> $GITHUB_OUTPUT
fi
done

View File

@ -81,13 +81,12 @@ jobs:
NAME_LOWER=$(echo "${{ matrix.name }}" | awk '{print tolower($0)}')
echo "Matrix name: ${{ matrix.name }}"
echo "NAME_LOWER: $NAME_LOWER"
echo "::set-output name=name_lower::$NAME_LOWER"
echo "name_lower=$NAME_LOWER" >> $GITHUB_OUTPUT
BRANCH_NAME=$(echo "$GITHUB_REF" | sed "s#refs/heads/##g")
echo "GITHUB_REF: $GITHUB_REF"
echo "BRANCH_NAME: $BRANCH_NAME"
echo "::set-output name=branch_name::$BRANCH_NAME"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
mkdir publish
- name: Create GitHub deployment for ${{ matrix.name }}
@ -126,7 +125,7 @@ jobs:
--query value --output tsv
)
echo "::add-mask::$webapp_name"
echo "::set-output name=webapp-name::$webapp_name"
echo "webapp-name=$webapp_name" >> $GITHUB_OUTPUT
- name: Stop App Service
env:

View File

@ -48,7 +48,7 @@ jobs:
id: branch
run: |
BRANCH_NAME=$(basename ${{ github.ref }})
echo "::set-output name=branch-name::$BRANCH_NAME"
echo "branch-name=$BRANCH_NAME" >> $GITHUB_OUTPUT
deploy:
name: Deploy
@ -72,7 +72,7 @@ jobs:
NAME_LOWER=$(echo "${{ matrix.name }}" | awk '{print tolower($0)}')
echo "Matrix name: ${{ matrix.name }}"
echo "NAME_LOWER: $NAME_LOWER"
echo "::set-output name=name_lower::$NAME_LOWER"
echo "name_lower=$NAME_LOWER" >> $GITHUB_OUTPUT
- name: Create GitHub deployment for ${{ matrix.name }}
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
@ -124,9 +124,9 @@ jobs:
--query value --output tsv
)
echo "::add-mask::$webapp_name"
echo "::set-output name=webapp-name::$webapp_name"
echo "webapp-name=$webapp_name" >> $GITHUB_OUTPUT
echo "::add-mask::$publish_profile"
echo "::set-output name=publish-profile::$publish_profile"
echo "publish-profile=$publish_profile" >> $GITHUB_OUTPUT
- name: Deploy App
uses: azure/webapps-deploy@0b651ed7546ecfc75024011f76944cb9b381ef1e
@ -229,7 +229,7 @@ jobs:
PROJECT_NAME=$(echo "${{ matrix.project_name }}" | awk '{print tolower($0)}')
echo "Matrix name: ${{ matrix.project_name }}"
echo "PROJECT_NAME: $PROJECT_NAME"
echo "::set-output name=project_name::$PROJECT_NAME"
echo "project_name=$PROJECT_NAME" >> $GITHUB_OUTPUT
########## DockerHub ##########
- name: Setup DCT
@ -245,9 +245,9 @@ jobs:
if: matrix.origin_docker_repo == 'bitwarden'
run: |
if [[ "${{ matrix.skip_dct }}" == "true" ]]; then
echo "::set-output name=dct_enabled::0"
echo "dct_enabled=0" >> $GITHUB_OUTPUT
else
echo "::set-output name=dct_enabled::1"
echo "dct_enabled=1" >> $GITHUB_OUTPUT
fi
- name: Pull latest project image

View File

@ -27,7 +27,7 @@ jobs:
NAME_LOWER=$(echo "${{ matrix.name }}" | awk '{print tolower($0)}')
echo "Matrix name: ${{ matrix.name }}"
echo "NAME_LOWER: $NAME_LOWER"
echo "::set-output name=name_lower::$NAME_LOWER"
echo "name_lower=$NAME_LOWER" >> $GITHUB_OUTPUT
- name: Login to Azure
uses: Azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf
@ -45,7 +45,7 @@ jobs:
--query value --output tsv
)
echo "::add-mask::$webapp_name"
echo "::set-output name=webapp-name::$webapp_name"
echo "webapp-name=$webapp_name" >> $GITHUB_OUTPUT
- name: Stop staging slot
env:

View File

@ -37,8 +37,7 @@ jobs:
git_commit_gpgsign: true
- name: Create Version Branch
run: |
git switch -c version_bump_${{ github.event.inputs.version_number }}
run: git switch -c version_bump_${{ github.event.inputs.version_number }}
- name: Bump Version - Props
uses: bitwarden/gh-actions/version-bump@6a42772f8849107fd457cf47cd9c7e224be44e55
@ -55,16 +54,15 @@ jobs:
id: version-changed
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::set-output name=changes_to_commit::TRUE"
echo "changes_to_commit=TRUE" >> $GITHUB_OUTPUT
else
echo "::set-output name=changes_to_commit::FALSE"
echo "changes_to_commit=FALSE" >> $GITHUB_OUTPUT
echo "No changes to commit!";
fi
- name: Commit files
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
run: |
git commit -m "Bumped version to ${{ github.event.inputs.version_number }}" -a
run: git commit -m "Bumped version to ${{ github.event.inputs.version_number }}" -a
- name: Push changes
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}