Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
xxsimoxx committed Dec 3, 2024
1 parent 3353bf1 commit 4611966
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/cpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ClassicPress Directory Coding Standard checks.

on: [pull_request, push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpcs:
name: CPCS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: CPCS get rules
run: |
wget -O phpcs.xml https://raw.githubusercontent.com/ClassicPress/ClassicPress-Coding-Standards/main/phpcs.xml
sed -i '/^\t<!-- start config -->.*/a\
<file>.</file>
' phpcs.xml
sed -i '/MY_DOMAIN/ s//stats-for-update-manager/' phpcs.xml
mv phpcs.xml phpcs.xml.dist
- name: CPCS checks
uses: 10up/wpcs-action@stable
with:
use_local_config: 'true'
enable_warnings: 'true'
extra_args: '--report-json=./phpcs.json'
- name: Update summary
run: |
npm i -g github:10up/phpcs-json-to-md
phpcs-json-to-md --path ./phpcs.json --output ./phpcs.md
cat phpcs.md >> $GITHUB_STEP_SUMMARY
if: always()
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Create artifact
run : |
git archive -o ${{ github.event.repository.name }}-${{ github.ref_name }}.zip --prefix ${{ github.event.repository.name }}/ HEAD
git archive -o ${{ github.event.repository.name }}-${{ github.ref_name }}.zip --prefix ${{ github.event.repository.name }}/ HEAD
ls
- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store

0 comments on commit 4611966

Please sign in to comment.