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 665f35d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 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
17 changes: 11 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 "benjamin@opencollective.com"
git config user.name "Burnex Bot"
git add priv/burner-email-providers/emails.txt
Expand All @@ -32,13 +35,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
git push
git push --tags
17 changes: 15 additions & 2 deletions .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 @@ -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"]'

Expand Down Expand Up @@ -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

0 comments on commit 665f35d

Please sign in to comment.