Bump felleslibVersion from 0.0.338 to 0.0.340 #73
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependabot auto-merge | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
env: | |
PR_SHA: ${{ github.event.pull_request.head.sha }} | |
WEBHOOK_URL: ${{ secrets.SLACK_VARSEL_WEBHOOK_URL }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Notify Slack on new major version | |
if: steps.metadata.outputs.update-type == 'version-update:semver-major' && steps.metadata.outputs.package-ecosystem != 'github_actions' | |
run: | | |
curl -X POST --data-urlencode "payload={ \"attachments\": [{ \"pretext\": \"[${{ github.event.repository.name }}] Ny major dependency versjon!\", \"color\": \"info\", \"fields\": [ { \"title\": \"Commit\", \"value\": \"<https://github.com/${{ github.repository }}/commit/$PR_SHA|$PR_SHA>\", \"short\": false }, { \"title\": \"Dependency\", \"value\": \"$DEPENDENCY_NAME $VERSION_CHANGE\", \"short\": false } ] }] }" $WEBHOOK_URL | |
env: | |
DEPENDENCY_NAME: ${{ steps.metadata.outputs.dependency-names }} | |
VERSION_CHANGE: "${{ steps.metadata.outputs.previous-version }} -> ${{ steps.metadata.outputs.new-version }}" | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
if: steps.metadata.outputs.package-ecosystem != 'github_actions' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
if: steps.metadata.outputs.package-ecosystem != 'github_actions' | |
- name: Build and run tests | |
run: ./gradlew build | |
if: steps.metadata.outputs.package-ecosystem != 'github_actions' | |
- name: Auto-merge changes from Dependabot | |
run: gh pr merge --auto --squash "$PR_URL" | |
if: steps.metadata.outputs.update-type != 'version-update:semver-major' || steps.metadata.outputs.package-ecosystem == 'github_actions' | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Notify Slack in case of merge failure | |
if: failure() && steps.metadata.outputs.update-type != 'version-update:semver-major' | |
run: | | |
curl -X POST --data-urlencode "payload={ \"attachments\": [{ \"pretext\": \"[${{ github.event.repository.name }}] Dependabot auto-merge feilet :cry:\", \"color\": \"danger\", \"fields\": [ { \"title\": \"Commit\", \"value\": \"<https://github.com/${{ github.repository }}/commit/$PR_SHA|$PR_SHA>\", \"short\": false }, { \"title\": \"Dependency\", \"value\": \"$DEPENDENCY_NAME $VERSION_CHANGE\", \"short\": false } ] }] }" $WEBHOOK_URL | |
env: | |
DEPENDENCY_NAME: ${{ steps.metadata.outputs.dependency-names }} | |
VERSION_CHANGE: "${{ steps.metadata.outputs.previous-version }} -> ${{ steps.metadata.outputs.new-version }}" |