Skip to content

Commit

Permalink
chore: remove testing configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tabathadelane committed May 12, 2023
1 parent 847230f commit c9c7af0
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/check-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@ name: Check images

on:
workflow_dispatch:
pull_request:
branch:
- tabatha/images-workflow2
# schedule:
# - cron: '0 17 * * 2' # 9AM PST (5PM UTC) on Tuesday mornings
schedule:
- cron: '0 17 * * 2' # 9AM PST (5PM UTC) on Tuesday mornings

env:
BOT_NAME: nr-opensource-bot
BOT_EMAIL: opensource+bot@newrelic.com

jobs:
check-images:
name: Convert to WebP/Remove unused
name: Convert or delete
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: tabatha/images-workflow2
ref: develop
persist-credentials: false

- name: Setup node.js
Expand All @@ -36,17 +33,19 @@ jobs:

- name: Convert images to WEBP
run: yarn convert-to-webp -g
# - name: Commit changes
# id: commit-changes
# run: |
# git config --local user.email "${{ env.BOT_EMAIL }}"
# git config --local user.name "${{ env.BOT_NAME }}"
# git add .src/images
# git commit -m 'chore: remove unused images & convert to webp'
# echo "commit=true" >> $GITHUB_OUTPUT
# - name: Push Commit
# if: steps.commit-changes.outputs.commit == 'true'
# uses: ad-m/github-push-action@v0.6.0
# with:
# github_token: ${{ secrets.DEVEX_OPENSOURCE_BOT_TOKEN }}
# branch: develop

- name: Commit changes
id: commit-changes
run: |
git config --local user.email "${{ env.BOT_EMAIL }}"
git config --local user.name "${{ env.BOT_NAME }}"
git add .src/images
git commit -m 'chore: remove unused images & convert to webp'
echo "commit=true" >> $GITHUB_OUTPUT
- name: Push Commit
if: steps.commit-changes.outputs.commit == 'true'
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.DEVEX_OPENSOURCE_BOT_TOKEN }}
branch: develop

0 comments on commit c9c7af0

Please sign in to comment.