mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-06 15:20:36 +00:00
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
name: release-ci
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
# In case we change the some build scripts:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'utils/*/install.sh'
|
|
- '.ci/release-ci/**'
|
|
- '.github/workflows/release-ci.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'utils/*/install.sh'
|
|
- '.ci/release-ci/**'
|
|
- '.github/workflows/release-ci.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- release-type: deb
|
|
release-env: debian
|
|
- release-type: deb
|
|
release-env: ubuntu
|
|
- release-type: rpm
|
|
release-env: fedora
|
|
- release-type: apk
|
|
release-env: alpine
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run checks
|
|
run: |
|
|
SECRETS_RELEASE_ENV="${{ matrix.release-env }}" \
|
|
SECRETS_RELEASE_TYPE="${{ matrix.release-type }}" \
|
|
make release-ci
|
|
|
|
# https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
|
|
create-issue-on-failure:
|
|
name: Create an issue if release-ci failed
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
if: ${{ github.repository == 'sobolevn/git-secret' && always() && needs.build.result == 'failure' }}
|
|
permissions:
|
|
issues: write
|
|
steps:
|
|
- uses: actions/github-script@v3
|
|
with:
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
script: |
|
|
await github.issues.create({
|
|
owner: "sobolevn",
|
|
repo: "git-secret",
|
|
title: `release-ci on ${new Date().toDateString()}`,
|
|
body: "Details: https://github.com/sobolevn/git-secret/actions/workflows/release-ci.yml",
|
|
})
|