From 1921973b1f01df5a3f232b2ca5a8c7f622b829cb Mon Sep 17 00:00:00 2001 From: dolfinus Date: Sun, 31 Oct 2021 14:11:04 +0300 Subject: [PATCH] Update workflow --- .github/workflows/release.yml | 17 +++++++---------- .github/workflows/sync.yml | 26 ++++++++++++++++++++------ .github/workflows/test.yml | 17 +++++++++++++++-- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 950d465..cbf650c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: Releases on: - workflow_dispatch: - #push: - # tags: - # - .* + push: + tags: + - .* jobs: release: @@ -17,7 +16,7 @@ jobs: id: wait-for-tests with: token: ${{ secrets.GITHUB_TOKEN }} - checkName: Run dialyzer + checkName: All done ref: ${{ github.ref }} timeoutSeconds: 3600 @@ -47,12 +46,10 @@ jobs: - name: Create release id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + token: ${{ secrets.PERSONAL_TOKEN }} + name: Release ${{ github.ref }} draft: false prerelease: false diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index a2c1f19..04bfa89 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -1,6 +1,7 @@ name: Daily list sync on: + workflow_dispatch: schedule: - cron: "30 15 * * *" @@ -9,8 +10,19 @@ jobs: runs-on: ubuntu-latest steps: + - name: Wait for tests + uses: fountainhead/action-wait-for-check@v1.0.0 + id: wait-for-tests + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: All done + ref: ${{ github.ref }} + timeoutSeconds: 3600 + - name: Checkout uses: actions/checkout@v2 + with: + token: ${{ secrets.PERSONAL_TOKEN }} - name: Download new list run: ./update_providers.sh @@ -23,7 +35,7 @@ jobs: - name: Commit changes if: steps.changes.outcome != 'success' run: | - git checkout main -- + git checkout master -- git config user.email "benjamin@opencollective.com" git config user.name "Burnex Bot" git add priv/burner-email-providers/emails.txt @@ -32,13 +44,15 @@ jobs: if: steps.changes.outcome != 'success' run: | CURRENT_VERSION=`cat VERSION` - NEW_PATCH=`echo $CURRENT_TAG | sed -E 's/v[0-9]+\.[0-9]+\.([0-9]+)/\1+1/' | bc` - NEW_TAG=`echo $CURRENT_TAG | sed -E "s/(v[0-9]+\.[0-9]+\.)[0-9]+/\1$NEW_PATCH/"` - echo $NEW_TAG > VERSION + NEW_PATCH=`echo $CURRENT_VERSION | sed -E 's/v?[0-9]+\.[0-9]+\.([0-9]+)/\1+1/' | bc` + NEW_VERSION=`echo $CURRENT_VERSION | sed -E "s/(v?[0-9]+\.[0-9]+\.)[0-9]+/\1$NEW_PATCH/"` + echo $NEW_VERSION > VERSION + git add VERSION git commit -m "chore: updated domain list" - git tag -a $NEW_TAG -m $NEW_TAG + git tag -a $NEW_VERSION -m $NEW_VERSION - name: Push changes if: steps.changes.outcome != 'success' run: | - git push --follow-tags \ No newline at end of file + git push + git push --tags \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61722b0..33cc99b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: Test on: push: + branches: + - '**' pull_request: branches: - master @@ -17,9 +19,10 @@ jobs: - id: skip_check uses: fkirc/skip-duplicate-actions@master with: - concurrent_skipping: always + github_token: ${{ secrets.GITHUB_TOKEN }} + concurrent_skipping: same_content_newer cancel_others: true - skip_after_successful_duplicate: true + skip_after_successful_duplicate: false paths_ignore: '["**/README.md", "**/CHANGELOG.md", "**/LICENSE"]' do_not_skip: '["pull_request"]' @@ -155,3 +158,13 @@ jobs: - name: Run dialyzer run: mix dialyzer + + done: + name: All done + needs: [credo, dialyzer] + runs-on: ubuntu-latest + + steps: + + - name: All done + run: echo Done