Skip to content

Commit

Permalink
Merge pull request #754 from Kovah/dev
Browse files Browse the repository at this point in the history
v1 Release
  • Loading branch information
Kovah authored Feb 20, 2024
2 parents e91970f + 30574ec commit ccd3f44
Show file tree
Hide file tree
Showing 13 changed files with 366 additions and 278 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
continue-on-error: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -37,7 +37,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -50,7 +50,7 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v3.2.0
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -44,7 +44,7 @@ jobs:
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push advanced image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./resources/docker/dockerfiles/release-multiplatform.Dockerfile
Expand All @@ -62,7 +62,7 @@ jobs:
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push simple image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./resources/docker/dockerfiles/release-multiplatform-simple.Dockerfile
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
name: Build assets for the package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Reconfigure Git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -29,13 +29,13 @@ jobs:
npm run production
- name: Upload built assets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: assets
path: public/assets/dist

- name: Upload mix manifest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mix-manifest
path: public/mix-manifest.json
Expand All @@ -45,14 +45,14 @@ jobs:
runs-on: ubuntu-latest
needs: build-js
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: assets
path: public/assets/dist

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: mix-manifest
path: public
Expand All @@ -65,7 +65,7 @@ jobs:
- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -91,7 +91,7 @@ jobs:
filename: linkace.zip
exclusions: '*.git*'

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linkace-package
path: linkace.zip
Expand All @@ -100,7 +100,7 @@ jobs:
name: Build final dist package for Docker setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Rename files
run: |
Expand All @@ -112,7 +112,7 @@ jobs:
with:
args: zip -qq linkace-package-docker-simple.zip docker-compose.yml .env LICENSE.md README.md

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linkace-docker-simple
path: linkace-package-docker-simple.zip
Expand All @@ -124,7 +124,7 @@ jobs:
with:
args: zip -qq linkace-package-docker-advanced.zip docker-compose.yml .env nginx.conf nginx-ssl.conf LICENSE.md README.md

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linkace-docker-advanced
path: linkace-package-docker-advanced.zip
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -23,13 +23,13 @@ jobs:
npm run production
- name: Upload built assets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: assets
path: public/assets/dist

- name: Upload mix manifest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mix-manifest
path: public/mix-manifest.json
Expand All @@ -45,14 +45,14 @@ jobs:
php-versions: [ '8.1', '8.2', '8.3' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: assets
path: public/assets/dist

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: mix-manifest
path: public
Expand All @@ -68,7 +68,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -89,13 +89,13 @@ jobs:
- name: Run PHPunit
run: composer run test

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: application-logs
path: storage/logs

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: application-public
Expand Down
8 changes: 5 additions & 3 deletions app/Actions/ImportHtmlBookmarks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\Helper\LinkIconMapper;
use App\Models\Link;
use App\Models\Tag;
use Carbon\Carbon;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
use Shaarli\NetscapeBookmarkParser\NetscapeBookmarkParser;

Expand All @@ -20,7 +20,7 @@ class ImportHtmlBookmarks
*
* @param string $data
* @param string $userId
* @param bool $generateMeta
* @param bool $generateMeta
* @return bool
*/
public function run(string $data, string $userId, bool $generateMeta = true): bool
Expand Down Expand Up @@ -64,7 +64,9 @@ public function run(string $data, string $userId, bool $generateMeta = true): bo
'icon' => LinkIconMapper::mapLink($link['url']),
'is_private' => usersettings('tags_private_default') === '1' ? true : $isPublic,
]);
$newLink->created_at = Carbon::createFromTimestamp($link['dateCreated']);
$newLink->created_at = $link['dateCreated']
? Carbon::createFromTimestamp($link['dateCreated'])
: Carbon::now();
$newLink->updated_at = Carbon::now();
$newLink->timestamps = false;
$newLink->save();
Expand Down
Loading

0 comments on commit ccd3f44

Please sign in to comment.