Skip to content

Commit

Permalink
[TASK] Resolve deprecations in github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
o-ba committed Nov 2, 2022
1 parent d3bc027 commit 226b5b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -20,12 +20,12 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
path: ${{ env.composer_cache_dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ jobs:
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Check tag
run: |
Expand All @@ -463,17 +463,17 @@ jobs:
- name: Get version
id: get-version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Get comment
id: get-comment
run: |
readonly local comment=$(git tag -n10 -l ${{ steps.get-version.outputs.version }} | sed "s/^[0-9.]*[ ]*//g")
readonly local comment=$(git tag -n10 -l ${{ env.version }} | sed "s/^[0-9.]*[ ]*//g")
if [[ -z "${comment// }" ]]; then
echo ::set-output name=comment::Released version ${{ steps.get-version.outputs.version }} of ${{ env.TYPO3_EXTENSION_KEY }}
echo "comment=Released version ${{ env.version }} of ${{ env.TYPO3_EXTENSION_KEY }}" >> $GITHUB_ENV
else
echo ::set-output name=comment::$comment
echo "comment=$comment" >> $GITHUB_ENV
fi
- name: Setup PHP
Expand All @@ -487,7 +487,7 @@ jobs:
run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest

- name: Publish to TER
run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ steps.get-comment.outputs.comment }}" ${{ steps.get-version.outputs.version }}
run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ env.comment }}" ${{ env.version }}
```

**Note**: If you're using tags with a leading `v` the above example needs to be adjusted.
Expand All @@ -507,7 +507,7 @@ ${GITHUB_REF#refs/tags/v}
3. The variable declaration in step **Get comment** should be:

```bash
$(git tag -n10 -l v${{ steps.get-version.outputs.version }} | sed "s/^v[0-9.]*[ ]*//g")
$(git tag -n10 -l v${{ env.version }} | sed "s/^v[0-9.]*[ ]*//g")
```

#### GitHub actions from TYPO3 community
Expand Down

0 comments on commit 226b5b7

Please sign in to comment.