Skip to content

Commit 992a57e

Browse files
committed
Remove deprecated set-output in GitHub workflow for release
Completely removing the intermediate step calculating the tag_name as GitHub Actions is now providing this value in the context directly. See https://github.com/orgs/community/discussions/26686 and https://docs.github.com/en/actions/learn-github-actions/contexts#github-context part of #307 Signed-off-by: Aurélien Pupier <[email protected]>
1 parent ff87b53 commit 992a57e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/release-project.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ jobs:
3030
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3131
restore-keys: ${{ runner.os }}-m2
3232

33-
- name: Extract tag name
34-
id: extract_tagname
35-
shell: bash
36-
# Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
37-
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
38-
3933
- name: Set up JDK 17
4034
uses: actions/setup-java@v3
4135
with:
@@ -56,7 +50,7 @@ jobs:
5650
output_file: custom_maven_settings.xml
5751
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
5852
- name: Set version with Maven
59-
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }}
53+
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ github.ref_name }}
6054
env:
6155
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6256
- name: Deploy with Maven to GitHub Packages and Docker Hub

.github/workflows/sonarcloud-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
echo "sonar_opts=-Dsonar.host.url=https://sonarcloud.io \
5656
-Dsonar.projectKey=com-pas_compas-scl-data-service \
57-
-Dsonar.organization=com-pas \" >> $GITHUB_OUTPUT
57+
-Dsonar.organization=com-pas" >> $GITHUB_OUTPUT
5858
- name: Create custom Maven Settings.xml
5959
uses: whelk-io/maven-settings-xml-action@v21
6060
with:

0 commit comments

Comments
 (0)