diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6fb4104d..de468f036 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,9 @@ jobs: run: rake check:rubocop Package: + # skip in master, but run in forks + if: github.ref_name != 'master' || github.repository_owner != 'yast' + runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml new file mode 100644 index 000000000..766f61e39 --- /dev/null +++ b/.github/workflows/submit.yml @@ -0,0 +1,29 @@ +# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions + +name: OBS + +on: + # only when committing to master + push: + branches: master + + # allow running manually from GitHub Web + workflow_dispatch: + +jobs: + submit: + # do not run in forks + if: github.repository_owner == 'yast' + + runs-on: ubuntu-latest + + # the default timeout is 6 hours, do not wait for that long if osc gets stucked + timeout-minutes: 30 + + steps: + - name: Submit the package + # see https://github.com/yast/actions/blob/master/submit/action.yml + uses: yast/actions/submit@master + with: + obs_user: ${{ secrets.OBS_USER }} + obs_password: ${{ secrets.OBS_PASSWORD }} diff --git a/README.md b/README.md index 1cc8af0eb..c3054d852 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ [![Workflow Status](https://github.com/yast/yast-network/workflows/CI/badge.svg?branch=master)]( https://github.com/yast/yast-network/actions?query=branch%3Amaster) -[![Jenkins Status](https://ci.opensuse.org/buildStatus/icon?job=yast-yast-network-master)]( -https://ci.opensuse.org/view/Yast/job/yast-yast-network-master/) +[![OBS](https://github.com/yast/yast-network/actions/workflows/submit.yml/badge.svg)](https://github.com/yast/yast-network/actions/workflows/submit.yml) [![Coverage Status](https://coveralls.io/repos/yast/yast-network/badge.png)](https://coveralls.io/r/yast/yast-network) [![Code Climate](https://codeclimate.com/github/yast/yast-network/badges/gpa.svg)](https://codeclimate.com/github/yast/yast-network)