A free, self-hostable news aggregator…
Pin the docker publish actions and scope two workflow tokens (#9200)
Thibaud-Vdb9f00a04b11f9
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.ymlindex 5b00374a7..4ec9c0caa 100644--- a/.github/workflows/docker-publish.yml+++ b/.github/workflows/docker-publish.yml@@ -40,13 +40,13 @@ jobs:# type=semver,pattern={{major}}.{{minor}}-alpinesteps:- name: Set up QEMU- uses: docker/setup-qemu-action@v4+ uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0- name: Set up Docker Buildx- uses: docker/setup-buildx-action@v4+ uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0- name: Checkout- uses: actions/checkout@v7+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- name: Get FreshRSS versionrun: |@@ -56,7 +56,7 @@ jobs:- name: Add metadata to Docker imagesid: meta- uses: docker/metadata-action@v6+ uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0with:flavor: ${{ matrix.flavor }}images: |@@ -69,21 +69,21 @@ jobs:- name: Login to Docker Hubif: github.repository_owner == 'FreshRSS'- uses: docker/login-action@v4+ uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0with:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}- name: Login to GitHub Container Registryif: github.repository_owner == 'FreshRSS'- uses: docker/login-action@v4+ uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0with:registry: ghcr.iousername: ${{ github.repository_owner }}password: ${{ secrets.GITHUB_TOKEN }}- name: Build and push Docker images- uses: docker/build-push-action@v7+ uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0with:context: . # Switching from git context to path context, needed for .dockerignore to be applied. See: https://github.com/docker/build-push-action#git-contextfile: ${{ matrix.file }}diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.ymlindex 3ce41dd90..ced6383d0 100644--- a/.github/workflows/dockerhub-description.yml+++ b/.github/workflows/dockerhub-description.yml@@ -8,12 +8,15 @@ on:- edgeworkflow_dispatch:+permissions:+ contents: read+jobs:dockerhub-description:if: github.repository_owner == 'FreshRSS'runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v7+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- name: Update repo descriptionuses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfadiff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.ymlindex bb5598d73..984d35bea 100644--- a/.github/workflows/jekyll-gh-pages.yml+++ b/.github/workflows/jekyll-gh-pages.yml@@ -29,7 +29,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout- uses: actions/checkout@v7+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- name: Setup Rubyuses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01bwith:@@ -38,13 +38,13 @@ jobs:cache-version: 1 # Increment this number if you need to re-download cached gemsworking-directory: docs- name: Setup Pages- uses: actions/configure-pages@v6+ uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0- name: Build with Jekyllrun: |cd docsbundle exec jekyll build --destination ../_site- name: Upload artifact- uses: actions/upload-pages-artifact@v5+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0# Deployment jobdeploy:@@ -56,4 +56,4 @@ jobs:steps:- name: Deploy to GitHub Pagesid: deployment- uses: actions/deploy-pages@v5+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 6438eb68e..b220273e8 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -6,6 +6,9 @@ on:pull_request:branches: [ edge ]+permissions:+ contents: read+jobs:tests:@@ -14,7 +17,7 @@ jobs:steps:- name: Git checkout source code- uses: actions/checkout@v7+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1# Composer tests@@ -29,7 +32,7 @@ jobs:- name: Use Composer cacheid: composer-cache- uses: actions/cache@v6+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0with:path: vendorkey: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}@@ -55,7 +58,7 @@ jobs:# NPM tests- name: Uses Node.js- uses: actions/setup-node@v7+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0with:# https://nodejs.org/en/about/previous-releasesnode-version: lts/*@@ -79,7 +82,7 @@ jobs:- name: Use shell cacheid: shell-cache- uses: actions/cache@v6+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0with:path: binkey: ${{ runner.os }}[email protected]@[email protected]