Skip to content

Commit

Permalink
Fix autodelete
Browse files Browse the repository at this point in the history
Committer email is GitHub actions!
  • Loading branch information
politician committed Feb 18, 2022
1 parent b133071 commit 220ac98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/autodelete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ jobs:

- name: Warn domains expiring in 1 month
run: |
export DATE=$(date -v-1y -v+1m)
export DATE=$(date -d "$(date -d "1 month") 1 year ago")
export EXPIRY="will expire in 1 month"
./scripts/expiring.sh
- name: Warn domains expiring in 1 week
run: |
export DATE=$(date -v-1y -v+1w)
export DATE=$(date -d "$(date -d "1 week") 1 year ago")
export EXPIRY="will expire next week"
./scripts/expiring.sh
- name: Warn domains expiring in 1 day
run: |
export DATE=$(date -v-1y -v+1d)
export DATE=$(date -d "$(date -d "1 day") 1 year ago")
export EXPIRY="expires tomorrow"
./scripts/expiring.sh
- name: Delete domains older than 1 year
run: |
export DATE=$(date -v-1y)
export DATE=$(date -d "1 year ago")
./scripts/expired.sh
- name: Commit any changes
Expand Down
2 changes: 1 addition & 1 deletion scripts/expiring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ do

for line in ${EXPIRING_LINES[*]}
do
COMMITTER_INFO=$(git blame --line-porcelain "$ZONE" -L"$line" | grep -E '^(committer-mail)?[[:space:]]' | tr '\n' ' ' | awk -e '{gsub(/[ :]/, "", $3); printf "%s %s.'"$TLD"'", substr($2,2,length($2)-2), $3}')
COMMITTER_INFO=$(git blame --line-porcelain "$ZONE" -L"$line" | grep -E '^(author-mail)?[[:space:]]' | tr '\n' ' ' | awk -e '{gsub(/[ :]/, "", $3); printf "%s %s.'"$TLD"'", substr($2,2,length($2)-2), $3}')
echo "${COMMITTER_INFO[@]}" | xargs ./scripts/mail.sh
unset COMMITTER_INFO
done
Expand Down

0 comments on commit 220ac98

Please sign in to comment.