Skip to content

Commit e15779d

Browse files
committed
Update github workflows
1 parent c4e4f8e commit e15779d

6 files changed

Lines changed: 27 additions & 48 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Automatically tag new version"
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
paths:
8+
- "setup.php"
9+
10+
jobs:
11+
auto-tag-new-version:
12+
name: "Automatically tag new version"
13+
uses: "glpi-project/plugin-release-workflows/.github/workflows/auto-tag-new-version.yml@v1"
14+
secrets:
15+
github-token: "${{ secrets.AUTOTAG_TOKEN }}"

.github/workflows/release.yml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,13 @@
1+
name: "Publish release"
12

23
on:
34
push:
4-
# Sequence of patterns matched against refs/tags
55
tags:
6-
- '*.*.*' # Push events to matching ex:20.15.10
6+
- '*'
77

8-
name: Create release with tag
9-
env:
10-
TAG_VALUE: ${GITHUB_REF/refs\/tags\//}
118
jobs:
12-
build:
13-
name: Upload Release Asset
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v2
18-
- name: Build project # This would actually build your project, using zip for an example artifact
19-
id: build_
20-
env:
21-
GITHUB_NAME: ${{ github.event.repository.name }}
22-
23-
24-
run: sudo apt-get install libxml-xpath-perl;echo $(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml);echo ::set-output name=version_glpi::$(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml); rm -rf $GITHUB_NAME.xml tools wiki screenshots test .git .github ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png;cd ..; tar jcvf glpi-$GITHUB_NAME-${GITHUB_REF/refs\/tags\//}.tar.bz2 $GITHUB_NAME;ls -al;echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//};echo ${{ steps.getxml.outputs.info }};
25-
# run: rm -rf $GITHUB_NAME.xml tools wiki screenshots test ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png; tar -zcvf glpi-$GITHUB_NAME-$GITHUB_TAG.tar.gz $GITHUB_NAME
26-
- name: Create Release
27-
id: create_release
28-
uses: actions/create-release@v1
29-
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
with:
32-
tag_name: ${{ github.ref }}
33-
release_name: |
34-
GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available
35-
body : Version ${{ steps.build_.outputs.tag }} released for GLPI ${{ steps.build_.outputs.version_glpi }}
36-
draft: false
37-
prerelease: true
38-
- name: Upload Release Asset
39-
id: upload-release-asset
40-
uses: actions/upload-release-asset@v1
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
GITHUB_NAME: ${{ github.event.repository.name }}
44-
with:
45-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
46-
asset_path: /home/runner/work/${{ github.event.repository.name }}/glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
47-
asset_name: glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
48-
asset_content_type: application/zip
49-
9+
publish-release:
10+
permissions:
11+
contents: "write"
12+
name: "Publish release"
13+
uses: "glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1"

inc/dashboard.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class PluginSatisfactionDashboard extends CommonGLPI
5656
const PERIOD_SELECTOR_HTML_ID = "period-selector";
5757

5858
/**
59-
* PluginResourcesDashboard constructor.
59+
* Dashboard constructor.
6060
*
6161
* @param array $options
6262
*/

inc/notificationMailing.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
}
3333

3434
/**
35-
* Class PluginResourcesNotification
35+
* Class PluginSatisfactionNotificationMailing
3636
*/
3737
class PluginSatisfactionNotificationMailing extends CommonDBTM
3838
{
@@ -141,7 +141,7 @@ public function getItems($resources_id, $start = 0)
141141

142142
$output = [];
143143

144-
$query = "SELECT `".$this->getTable()."`.`id`,
144+
$query = "SELECT `".$this->getTable()."`.`id`,
145145
`glpi_users`.`realname`,
146146
`glpi_users`.`firstname`,
147147
`glpi_users`.`name`,

inc/surveyquestion.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public function showForm($ID, $options = [])
232232

233233
echo "<form name='form' method='post' action='" . Toolbox::getItemTypeFormURL(self::getType()) . "'>";
234234

235-
echo "<div align='center'><table class='tab_cadre_fixe'>";
235+
echo "<div class='center'><table class='tab_cadre_fixe'>";
236236
echo "<tr><th colspan='4'>" . __('Add a question', 'satisfaction') . "</th></tr>";
237237

238238
echo "<tr class='tab_bg_1'>";

inc/surveyreminder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public function showForm($ID, $options = [])
281281

282282
echo "<form name='form' method='post' action='" . Toolbox::getItemTypeFormURL(self::getType()) . "'>";
283283

284-
echo "<div align='center'><table class='tab_cadre_fixe'>";
284+
echo "<div class='center'><table class='tab_cadre_fixe'>";
285285

286286
echo "<tr>";
287287
if ($displayPresetReminderForm) {

0 commit comments

Comments
 (0)