robertdebock / galaxy-action

Publish Ansible roles to Galaxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

only release for master branch?

stefangweichinger opened this issue · comments

Is there a way to only publish after successful molecule tests on master branch?

Right now it also publishes test runs from my test branches ... not as intended.

The goal: the same workflow should run the molecule tests for test- and master-branches, but the release step should only happen in master branch.

I think you can tell GitHub Actions to run on specific branches:

on:
  push:
    branches:
      - master

It has to be more specific, only that one release step should be skipped or not.
I think I found it:

stefangweichinger/ansible-rclone@96d4551

thanks

There's a catch: you can trigger a release from a feature branch, but if my observations and conclusions are correct - this will still publish metadata (possibly code too) from the master branch only.

See speechmatics/ansible-role-hostname#2 (comment)

@robertdebock would you say they're correct or am I doing something silly?