Skip to content

Commit

Permalink
Update github-actions to 4.17.0 (#179)
Browse files Browse the repository at this point in the history
* Switch between regular and scheduled channel
* Fix sonarcloud
  • Loading branch information
release-github-action[bot] authored Aug 16, 2024
1 parent 41fed06 commit b1d23ae
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 21 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/universal_workflow_light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ on:
description: 'Content of ~/oxid-esales/_custom.yaml'
default: ''
required: false
use_scheduled_slack_channel:
type: boolean
description: 'Use alternative slack channel'
default: false
required: false

secrets:
DOCKER_HUB_USER:
Expand All @@ -66,6 +71,9 @@ on:
SLACK_WEBHOOK_URL:
required: false
# description: Webhook for posting to SLACK
SLACK_SCHEDULED_WEBHOOK_URL:
required: false
# description: Webhook for posting to SLACK

jobs:
init:
Expand Down Expand Up @@ -1299,15 +1307,22 @@ jobs:
- yamllint
- actionlint
runs-on: ${{ fromJSON(inputs.runs_on) }}
env:
SLACK_WEBHOOK: "${{ secrets.SLACK_WEBHOOK_URL }}"
steps:
- name: Choose Slack channel
id: slack
shell: bash
run: |
if [ "${{ inputs.use_scheduled_slack_channel }}" == "false" ]; then
echo "webhook=${{ secrets.SLACK_WEBHOOK_URL }}" >>"${GITHUB_OUTPUT}"
else
echo "webhook=${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}" >>"${GITHUB_OUTPUT}"
fi
- name: 'Generate report'
id: generate_report
uses: 'OXID-eSales/github-actions/generate_report@v4'
with:
prefix: '${{ needs.init.outputs.global_title }}'
slack_webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
slack_webhook: ${{ steps.slack.outputs.webhook }}
title: '${{ needs.init.outputs.finish_slack_title }}'
compact: '${{ needs.init.outputs.finish_slack_compact }}'
debug: ${{ inputs.debug }}
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/universal_workflow_light.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ on:
description: 'Content of ~/oxid-esales/_custom.yaml'
default: ''
required: false
use_scheduled_slack_channel:
type: boolean
description: 'Use alternative slack channel'
default: false
required: false

secrets:
DOCKER_HUB_USER:
Expand All @@ -66,6 +71,9 @@ on:
SLACK_WEBHOOK_URL:
required: false
# description: Webhook for posting to SLACK
SLACK_SCHEDULED_WEBHOOK_URL:
required: false
# description: Webhook for posting to SLACK

jobs:
init:
Expand Down Expand Up @@ -1299,15 +1307,22 @@ jobs:
- yamllint
- actionlint
runs-on: ${{ fromJSON(inputs.runs_on) }}
env:
SLACK_WEBHOOK: "${{ secrets.SLACK_WEBHOOK_URL }}"
steps:
- name: Choose Slack channel
id: slack
shell: bash
run: |
if [ "${{ inputs.use_scheduled_slack_channel }}" == "false" ]; then
echo "webhook=${{ secrets.SLACK_WEBHOOK_URL }}" >>"${GITHUB_OUTPUT}"
else
echo "webhook=${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}" >>"${GITHUB_OUTPUT}"
fi
- name: 'Generate report'
id: generate_report
uses: 'OXID-eSales/github-actions/generate_report@v4'
with:
prefix: '${{ needs.init.outputs.global_title }}'
slack_webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
slack_webhook: ${{ steps.slack.outputs.webhook }}
title: '${{ needs.init.outputs.finish_slack_title }}'
compact: '${{ needs.init.outputs.finish_slack_compact }}'
debug: ${{ inputs.debug }}
Expand Down
7 changes: 0 additions & 7 deletions consolidate_artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,3 @@ runs:
path: ${{ inputs.path }}
retention-days: 4
overwrite: true

- name: 'Remove artifacts'
uses: joernott/rm-artifact@v1
with:
name: '${{ inputs.pattern }}'
useGlob: true
failOnError: false
24 changes: 16 additions & 8 deletions sonarcloud/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ inputs:
runs:
using: "composite"
steps:
- name: 'Consolidate coverage artifacts'
uses: 'OXID-eSales/github-actions/consolidate_artifacts@v4'
- name: 'Download artifacts'
uses: actions/download-artifact@v4
with:
target: '${{ inputs.output_artifact }}'
pattern: '${{ inputs.coverage_artifact }}'
merge-multiple: true
path: coverage-reports

- name: Fix Paths In Coverage Reports
Expand Down Expand Up @@ -108,12 +108,20 @@ runs:
echo "PHPUNIT_PARAM=-Dsonar.php.tests.reportPath=${PHPUNIT_FILES:1}"| tee -a "${GITHUB_ENV}"
fi
- name: Update consolidated coverage artifact
uses: 'OXID-eSales/github-actions/consolidate_artifacts@v4'
- name: Upload consolidated artifact
uses: actions/upload-artifact@v4
with:
target: '${{ inputs.output_artifact }}'
pattern: '${{ inputs.coverage_artifact }}'
path: coverage-reports
name: '${{ inputs.output_artifact }}'
path: 'coverage-reports'
retention-days: 4
overwrite: true

- name: 'Remove old artifacts'
uses: joernott/rm-artifact@v1
with:
name: '${{ inputs.coverage_artifact }}'
useGlob: true
failOnError: false

- name: Set target branch
shell: bash
Expand Down

0 comments on commit b1d23ae

Please sign in to comment.