liquidz / antq

Point out your outdated dependencies.
Other
403 stars 25 forks source link

Duplicate entries on github actions update #246

Closed dharrigan closed 8 months ago

dharrigan commented 8 months ago

Hi!

Clojure CLI version 1.11.1.1435 com.github.liquidz/antq {:mvn/version "2.8.1169"}

When running against a repo that has .github/workflows/*.yml, duplicate entries are created if (I think) there is an additional line between steps.

Before (notice the additional line between the build and publish steps):

---

name: Production

on:
  push:
  workflow_dispatch:

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/cache@v3
        id: restore-build
        with:
          path: ./*
          key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}

Executing: clojure -X:antq

after:

---

name: Production

on:
  push:
  workflow_dispatch:

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/cache@v3
        id: restore-build
        with:
          path: ./*
          key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}

  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/cache@v3
        id: restore-build
        with:
          path: ./*
          key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}

I've created a repo where you can reproduce this issue: https://github.com/dharrigan/antq-issue-246

-=david=-

liquidz commented 8 months ago

@dharrigan Thanks for your reporting! I could reproduce the problem. I'll fix it :)

liquidz commented 8 months ago

Memo: this is a problem on the rewrite-indented side.

liquidz commented 8 months ago

@dharrigan I've fixed this problem in dev branch. Could you try dev branch?

dharrigan commented 8 months ago

Hi,

Works perfectly. ありがとう :-)

-=david=-

liquidz commented 8 months ago

@dharrigan Thanks for your confirmation! I just released v2.8.1173 :)