From 72313be7e88b573a58b954a67647b018f2b1a88a 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 | 11 +++++------ .github/workflows/sync.yml | 16 ++++++++++------ .github/workflows/test.yml | 12 +++++++++++- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 950d465..4aeb894 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 @@ -49,7 +48,7 @@ jobs: id: create_release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index a2c1f19..cbae61f 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 * * *" @@ -11,6 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + token: ${{ secrets.PERSONAL_TOKEN }} - name: Download new list run: ./update_providers.sh @@ -23,7 +26,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 +35,14 @@ 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 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..f5b7878 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: with: concurrent_skipping: always 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 +155,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