Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Oct 31, 2021
1 parent c7d3513 commit fb9e5a9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Releases

on:
workflow_dispatch:
#push:
# tags:
# - .*
push:
tags:
- .*

jobs:
release:
Expand All @@ -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

Expand Down Expand Up @@ -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 }}
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Daily list sync

on:
workflow_dispatch:
schedule:
- cron: "30 15 * * *"

Expand All @@ -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
Expand All @@ -23,7 +26,7 @@ jobs:
- name: Commit changes
if: steps.changes.outcome != 'success'
run: |
git checkout main --
git checkout master --
git config user.email "[email protected]"
git config user.name "Burnex Bot"
git add priv/burner-email-providers/emails.txt
Expand All @@ -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
git push
git push --tags
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test

on:
push:
branches:
- '**'
pull_request:
branches:
- master
Expand All @@ -19,7 +21,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"]'

Expand Down Expand Up @@ -155,3 +157,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

0 comments on commit fb9e5a9

Please sign in to comment.