You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git-secret/.github/workflows/release-ci.yml

68 lines
1.8 KiB
YAML

3 years ago
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
3 years ago
strategy:
matrix:
include:
- release-type: deb
3 years ago
release-env: debian
- release-type: deb
release-env: ubuntu
3 years ago
- release-type: rpm
3 years ago
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",
})