diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb9c148..208e84e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,8 @@ name: Generate W3C Interoperability Report +permissions: + contents: read + on: workflow_dispatch: push: @@ -16,6 +19,8 @@ jobs: node-version: [20.x] steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -47,7 +52,7 @@ jobs: run: npm run test continue-on-error: true - name: Deploy to Github Pages - uses: JamesIves/github-pages-deploy-action@4.1.5 + uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3 with: branch: gh-pages folder: reports diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bf8b1b0..8ef6367 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,6 +39,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 with: + persist-credentials: false ref: ${{ inputs.ref || '' }} - name: Gather image info @@ -46,19 +47,11 @@ jobs: run: | echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1 - name: Log in to the GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -66,7 +59,7 @@ jobs: - name: Setup Image Metadata id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5.8.0 with: images: | ghcr.io/${{ steps.info.outputs.repo-owner }}/vc-data-model-2.0-test-suite @@ -74,7 +67,7 @@ jobs: type=raw,value=${{ inputs.tag || github.event.release.tag_name }} - name: Build and Push Image to ghcr.io - uses: docker/build-push-action@v6 + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0 with: push: true context: . @@ -83,11 +76,3 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max platforms: ${{ env.PLATFORMS }} - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache