Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
dockerfile_lint:
runs-on: ubuntu-latest
container:
image: node:18
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run dockerfile_lint
run: npx --cache .npx dockerfile_lint
Comment on lines +12 to +20
Copy link

@coderabbitai coderabbitai bot Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance Dockerfile linting setup

The current linting configuration has some potential improvements:

  1. Running in a container might be unnecessary since GitHub's ubuntu-latest already has Node.js
  2. Using npx without version pinning could pull unexpected versions

Consider this enhanced setup:

 dockerfile_lint:
   runs-on: ubuntu-latest
-  container:
-    image: node:18
   steps:
     - name: Checkout code
       uses: actions/checkout@v4
+    - name: Setup Node.js
+      uses: actions/setup-node@v4
+      with:
+        node-version: '18'
+        cache: 'npm'
     - name: Run dockerfile_lint
-      run: npx --cache .npx dockerfile_lint
+      run: npx -y [email protected]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dockerfile_lint:
runs-on: ubuntu-latest
container:
image: node:18
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run dockerfile_lint
run: npx --cache .npx dockerfile_lint
dockerfile_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Run dockerfile_lint
run: npx -y [email protected]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version of dockerfile_lint is v0.3.4, are you joking?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeterDaveHello, you're absolutely right, I apologize for the mistake. The latest version of dockerfile_lint is indeed v0.3.4. Here's the corrected suggestion:

dockerfile_lint:
  runs-on: ubuntu-latest
  steps:
    - name: Checkout code
      uses: actions/checkout@v4
    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        node-version: '18'
        cache: 'npm'
    - name: Run dockerfile_lint
      run: npx -y [email protected]

This updates the dockerfile_lint job to use the correct version of dockerfile_lint. Sorry for any confusion caused.


docker_build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker build -t tor-socks-proxy:${{ github.sha }} .
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Tor-socks-proxy

![license](https://img.shields.io/badge/license-GPLv3.0-brightgreen.svg?style=flat)
[![Build Status](https://app.travis-ci.com/PeterDaveHello/tor-socks-proxy.svg?branch=master)](https://app.travis-ci.com/PeterDaveHello/tor-socks-proxy)
[![Build Status](https://github.com/PeterDaveHello/tor-socks-proxy/actions/workflows/ci.yml/badge.svg)](https://github.com/PeterDaveHello/tor-socks-proxy/actions/workflows/ci.yml)
[![Docker Hub pulls](https://img.shields.io/docker/pulls/peterdavehello/tor-socks-proxy.svg)](https://hub.docker.com/r/peterdavehello/tor-socks-proxy/)

[![Docker Hub badge](http://dockeri.co/image/peterdavehello/tor-socks-proxy)](https://hub.docker.com/r/peterdavehello/tor-socks-proxy/)
Expand Down
Loading