Skip to content

Commit

Permalink
GA: Fjerner deprecated set-env syntax. (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
espenwaaga authored Nov 5, 2020
1 parent 21541f2 commit 3f1c6f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bygg og deploy
on:
push:
branches:
- master # Push events on master branch
- master # Push events on master branch
paths-ignore:
- '**.md'
- '**.MD'
Expand All @@ -25,28 +25,28 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 1.11

- name: Build artifacts & deploy
shell: bash
run: |
mvn jacoco:prepare-agent deploy -e --batch-mode --settings ./.github/.m2/settings.xml -Dmaven.wagon.http.pool=false --file pom.xml -Dchangelist= -Dsha1=$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')-$(echo $GITHUB_SHA | cut -c1-7) -Dfile.encoding=UTF-8 -Djacoco.destFile=$(pwd)/target/jacoco.exec
mvn jacoco:report sonar:sonar -e --batch-mode --settings ./.github/.m2/settings.xml --file pom.xml -Djacoco.dataFile=$(pwd)/target/jacoco.exec -Dsonar.projectKey="navikt_fp-tidsserie" -Dsonar.host.url='https://sonarcloud.io' -Dsonar.organization=navit -Dsonar.login=${SONAR_TOKEN} -Dsonar.exclusions="pom.xml,**/src/test/**/*"
echo "::set-env name=MVN_VERSION::$(mvn help:evaluate --batch-mode --settings ./.github/.m2/settings.xml --file .flattened -Dexpression=project.version -q -DforceStdout)"
echo "MVN_VERSION=$(mvn help:evaluate --batch-mode --settings ./.github/.m2/settings.xml --file .flattened -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
env:
GITHUB_USERNAME: x-access-token
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.MVN_VERSION }}
release_name: Release ${{ env.MVN_VERSION }}
draft: false
prerelease: false

8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Set cache key
run: |
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
Expand All @@ -43,7 +43,7 @@ jobs:
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
restore-keys: |
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
- uses: actions/setup-java@v1
with:
java-version: 1.11
Expand All @@ -58,10 +58,10 @@ jobs:
- name: Build
shell: bash
run: |
mvn clean package -B -V -e --settings ./.github/.m2/settings.xml -f "pom.xml" -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Denforcer.skip -Dmaven.javadoc.skip -DskipTests -Dmaven.test.skip.exec -Dlicense.skip=true -Drat.skip=true
mvn clean package -B -V -e --settings ./.github/.m2/settings.xml -f "pom.xml" -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Denforcer.skip -Dmaven.javadoc.skip -DskipTests -Dmaven.test.skip.exec -Dlicense.skip=true -Drat.skip=true
env:
GITHUB_USERNAME: x-access-token
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

0 comments on commit 3f1c6f2

Please sign in to comment.