Git Product home page Git Product logo

Comments (3)

norio-nomura avatar norio-nomura commented on August 16, 2024 2

If your workflow does not depend on DIFF_BASE feature implemented on #22, it can use the Docker image norionomura/swiftlint with version tag instead of action-swiftlint:

name: SwiftLint

on:
  pull_request:
    paths:
      - '.github/workflows/swiftlint.yml'
      - '.swiftlint.yml'
      - '**/*.swift'

jobs:
  SwiftLint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: SwiftLint
        uses: docker://norionomura/swiftlint:0.38.1
        with:
          args: swiftlint --reporter github-actions-logging

--reporter github-actions-logging option exists on SwiftLint 0.37.0 or later.

🤔

But if you want to use above, you might prefer to install swiftlint using Homebrew on macOS instead:

name: SwiftLint on macOS

on:
  pull_request:
    paths:
      - '.github/workflows/swiftlint-macos.yml'
      - '.swiftlint.yml'
      - '**/*.swift'

jobs:
  SwiftLint:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v1
      - name: Install SwiftLint 0.38.2
        env:
          HOMEBREW_NO_AUTO_UPDATE: 1 
        run: brew install https://raw.github.com/Homebrew/homebrew-core/203436f8567a3b6455264a1d896da5b1df1e50e6/Formula/swiftlint.rb
      - name: Run SwiftLint
        run: swiftlint lint --reporter github-actions-logging

The commit hash on hombrew-core can be found like following:

$ GIT_DIR=$(brew --repo homebrew/homebrew-core)/.git git --no-pager log master --grep=bottle --max-count 5 -- Formula/swiftlint.rb
commit b351d462bb8cbd8610f67dd433e9ab4593f3cfa6
Author: BrewTestBot <[email protected]>
Date:   Tue Feb 11 06:54:20 2020 +0000

    swiftlint: update 0.39.0 bottle.

commit 203436f8567a3b6455264a1d896da5b1df1e50e6
Author: BrewTestBot <[email protected]>
Date:   Wed Jan 8 21:55:28 2020 +0000

    swiftlint: update 0.38.2 bottle.

commit 0cfa1c726ca0ceb30cd5f0d370908963614da08d
Author: BrewTestBot <[email protected]>
Date:   Sat Jan 4 03:55:14 2020 +0000

    swiftlint: update 0.38.1 bottle.

commit b9ec4363fd9ddcdf912a8ac182dce8cb524a9d1d
Author: BrewTestBot <[email protected]>
Date:   Tue Dec 3 22:39:08 2019 +0000

    swiftlint: update 0.38.0 bottle.

commit c20187b22b1b6b550377d57c1fc8bcd9406b5502
Author: BrewTestBot <[email protected]>
Date:   Sat Nov 9 23:59:58 2019 +0000

    swiftlint: update 0.37.0 bottle.

from action-swiftlint.

norio-nomura avatar norio-nomura commented on August 16, 2024

As long as action-swiftlint uses the Docker image norionomura/swiftlint, it would be difficult to pin the version of swiftlint. 🤔
In order to realize that, I think it is necessary to rewrite everything in node.js, actions takes the version of SwiftLint to use, download that version from GitHub Release and execute it on macOS.
If I do that, I'd use another repository.

from action-swiftlint.

esteluk avatar esteluk commented on August 16, 2024

Okay, thanks :) Yeah I looked at the Docker image and it looked... non-trivial. Might take a look at what the right solution is for us - it might just be to unpin the version.

from action-swiftlint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.