diff --git a/.cspell.json b/.cspell.json index 56a831a..effec13 100644 --- a/.cspell.json +++ b/.cspell.json @@ -33,6 +33,7 @@ "dnsutils", "dockerhub", "dpkg", + "elif", "fakeroot", "getversion", "gfortran", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35c19a8..dadf30d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,17 +192,18 @@ jobs: - name: Docker Scout id: docker-scout uses: docker/scout-action@v0.23.4 + if: github.event_name == 'pull_request' with: # platform: linux/amd64 command: sbom,compare - image: ${{ github.ref == 'refs/heads/main' && steps.meta.outputs.tags || env.PATH_TO_IMAGE }} - type: ${{ github.ref == 'refs/heads/main' && 'image' || 'archive' }} + image: ${{ env.PATH_TO_IMAGE }} + type: archive to: ${{ env.TO_TAG }} ignore-unchanged: true only-severities: critical - write-comment: ${{ github.event_name == 'pull_request' && github.actor != 'nektos/act' }} + write-comment: ${{ github.actor != 'nektos/act' }} keep-previous-comments: true - summary: ${{ github.event_name == 'pull_request' && github.actor != 'nektos/act' }} + summary: ${{ github.actor != 'nektos/act' }} github-token: ${{ secrets.GITHUB_TOKEN }} organization: ${{ vars.DOCKERHUB_USER || github.repository_owner }} diff --git a/.gitignore b/.gitignore index 549fbd5..d1a4f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ megalinter-reports/ +.secrets +.vars \ No newline at end of file diff --git a/.secrets.example b/.secrets.example new file mode 100644 index 0000000..1fe3bd5 --- /dev/null +++ b/.secrets.example @@ -0,0 +1 @@ +DOCKERHUB_TOKEN= diff --git a/.vars.example b/.vars.example new file mode 100644 index 0000000..2495db1 --- /dev/null +++ b/.vars.example @@ -0,0 +1 @@ +DOCKERHUB_USER= diff --git a/README.md b/README.md index 1f0bd36..c06ecdf 100644 --- a/README.md +++ b/README.md @@ -46,18 +46,42 @@ documentation📖][nektosDocs] ## How I run act on my M2-Max 💻 -- didnt work properly when installed via brew, so I installed it via GitHub-CLI: +- installed HEAD Version of act via brew ```bash - gh extension install https://github.com/nektos/gh-act + brew install --HEAD act ``` -- set an alias: +- set an alias to always pass the GITHUB_TOKEN ```bash - alias act='gh act -s GITHUB_TOKEN="$(gh auth token)"' + # always add gh auth token to act + if validate_command act; then + alias act='act -s GITHUB_TOKEN="$(gh auth token)"' + # add alias to use gh act as act if gh-act is installed and act is not found + elif gh extension list | grep -q "nektos/gh-act"; then + alias act='gh act -s GITHUB_TOKEN="$(gh auth token)"' + fi ``` +> Previously I had issues when using the brew version of act, which seem to be gone 🥳 +> +> But if you run into kind of the same issues, this is how I used it as a github cli extension: +> +> - didnt work properly when installed via brew, so I installed it via GitHub-CLI: +> +> ```bash +> gh extension install https://github.com/nektos/gh-act +> ``` +> +> - set an alias: +> +> ```bash +> if gh extension list | grep -q "nektos/gh-act"; then +> alias act='gh act -s GITHUB_TOKEN="$(gh auth token)"' +> fi +> ``` + - Docker-Desktop settings: - Advanced: diff --git a/linux/ubuntu/Dockerfile b/linux/ubuntu/Dockerfile index 43b545b..e958a30 100644 --- a/linux/ubuntu/Dockerfile +++ b/linux/ubuntu/Dockerfile @@ -68,9 +68,12 @@ RUN bash -c "$(curl -fsSL https://raw.githubusercontent.com/ilikenwf/apt-fast/ma && rm -rf /var/lib/apt/lists/* # Install current version of git +# hadolint ignore=SC2035 RUN add-apt-repository -y ppa:git-core/ppa \ && apt-get -y update \ - && apt-get -y install --no-install-recommends git \ + && apt-get -y install --no-install-recommends \ + git \ + && git config --global safe.directory * \ && apt-get clean \ && rm -rf /etc/apt/sources.list.d/* \ && rm -rf /var/lib/apt/lists/*