name: Autoprefixer
on:
  push:
    branches:
      - main
jobs:
  autoprefixer:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout to latest commit
        uses: actions/checkout@v4.1.1

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: "15.x"

      - name: Run autoprefixer
        run: |
          npm install postcss postcss-cli autoprefixer --save-dev
          npm run autoprefixer

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v5
        with:
          branch: autoprefixer
          branch-suffix: timestamp
          commit-message: add vendor specific css prefixes
          title: "Update and run autoprefixer"
          body: |
            This PR runs [postcss/autoprefixer](https://github.com/postcss/autoprefixer) to update vendor specific CSS prefixes.

            >This PR has been created automatically by Github Action [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).
          labels: "enhancement,automerge"
          reviewers: hossainemruz
