Skip to content

Commit e02451c

Browse files
committed
Creating or updating opm-maker workflow
1 parent 335480b commit e02451c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/opm-maker.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: OPM Maker
2+
3+
on:
4+
push:
5+
paths:
6+
- "Custom/*.sopm"
7+
- ".github/workflows/*.yml"
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Build OPM
18+
run: docker run --rm -v ${{ github.workspace }}:/pkg -w /pkg ligero/otrs-itsm otrs.Console.pl Dev::Package::Build --allow-root --module-directory=/pkg Custom/*.sopm /pkg
19+
20+
21+
# Test
22+
#- name: OPM tests
23+
# uses:
24+
# run: docker-compose --file scripts/test/docker-compose.test.yml
25+
26+
- name: Get version tag
27+
id: get_version
28+
run: echo ::set-output name=VERSION::$(grep '<Version>' Custom/*.sopm | sed -r 's/.+>(.+)<.+/\1/')
29+
30+
- uses: rlespinasse/github-slug-action@master
31+
- name: Print slug variables
32+
run: |
33+
echo ${{ env.GITHUB_REF_SLUG }}
34+
echo ${{ env.GITHUB_HEAD_REF_SLUG }}
35+
echo ${{ env.GITHUB_BASE_REF_SLUG }}
36+
37+
- name: Upload OPM
38+
uses: "marvinpinto/action-automatic-releases@latest"
39+
with:
40+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
41+
automatic_release_tag: ${{ env.GITHUB_REF_SLUG }}
42+
prerelease: false
43+
title: ${{ steps.get_version.outputs.VERSION }}
44+
files: |
45+
*.opm

0 commit comments

Comments
 (0)