forked from paritytech/ansible-polkadot
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.48 KB
/
branch-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: main branch
on:
push:
branches:
- main
jobs:
run-molecule-tests:
strategy:
fail-fast: false
matrix:
role-names: [node, ws_health_exporter]
molecule-drivers: [docker]
# We test the latest version and minimum supported version
ansible-versions: [8.0.0, 9.0.1]
uses: ./.github/workflows/reusable-molecule.yml
with:
role-name: ${{ matrix.role-names }}
molecule-driver: ${{ matrix.molecule-drivers }}
ansible-version: ${{ matrix.ansible-versions }}
check-version:
uses: ./.github/workflows/reusable-check-version.yml
with:
compare-versions: false
deploy-galaxy:
needs: [run-molecule-tests, check-version]
uses: ./.github/workflows/reusable-galaxy-deploy.yml
secrets:
api-token: ${{ secrets.GALAXY_API_KEY }}
create-git-tag:
runs-on: ubuntu-22.04
needs: [deploy-galaxy, check-version]
env:
CURRENT_GALAXY_VERSION: ${{ needs.check-version.outputs.current-galaxy-version }}
steps:
- name: Print tag version
run: |
echo "Tag version: ${CURRENT_GALAXY_VERSION}"
- name: Create Tag
uses: actions/github-script@v6
with:
script: |
const {CURRENT_GALAXY_VERSION} = process.env
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${CURRENT_GALAXY_VERSION}`,
sha: context.sha
})