From 26c59d36464ec163939ec71acaf7d964ad7d742f Mon Sep 17 00:00:00 2001 From: Anders da Silva Rytter Hansen Date: Mon, 5 Jan 2026 15:22:00 -0300 Subject: [PATCH] upgrade versions --- .github/workflows/os.yml | 75 ++++++++++++---------------------------- 1 file changed, 22 insertions(+), 53 deletions(-) diff --git a/.github/workflows/os.yml b/.github/workflows/os.yml index e579aac..9fac5cc 100644 --- a/.github/workflows/os.yml +++ b/.github/workflows/os.yml @@ -1,38 +1,27 @@ name: os -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - on: schedule: - - cron: '0 5 8,18,28 * *' # 5 am three times every month + - cron: '0 5 8,18,28 * *' push: paths: - - 'Dockerfile' - - 'etc/**' - - 'usr/**' - - 'repo/**' - - '.github/workflows/os.yml' + - 'Dockerfile' + - 'etc/**' + - 'usr/**' + - 'repo/**' + - '.github/workflows/os.yml' + workflow_dispatch: # Gør det muligt at starte den manuelt til test env: - # Use docker.io for Docker Hub if empty REGISTRY: ghcr.io - # github.repository as / IMAGE_NAME: ${{ github.repository }} - IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} - jobs: build: - runs-on: ubuntu-latest permissions: contents: read packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. id-token: write steps: @@ -45,74 +34,54 @@ jobs: - name: Get current date id: date - run: echo "::set-output name=date::$(date +'%Y%m%d')" - - - name: Test with environment variables - run: echo $DATE - env: - DATE: ${{ steps.date.outputs.date }} + run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Opdateret til v4 - # Install the cosign tool except on PR - # https://github.com/sigstore/cosign-installer - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 + uses: sigstore/cosign-installer@v3.3.0 # Opdateret version with: - cosign-release: 'v2.1.1' + cosign-release: 'v2.2.2' - # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx - uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + uses: docker/setup-buildx-action@v3 # Opdateret til v3 with: + # Vigtigt: Aktiverer experimental support i BuildKit buildkitd-flags: --allow-insecure-entitlement security.insecure - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + uses: docker/login-action@v3 # Opdateret til v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v5 # Opdateret til v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a + uses: docker/build-push-action@v5 # Opdateret til v5 with: context: . push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }}, ${{ steps.meta.outputs.tags }}-10, ${{ steps.meta.outputs.tags }}-10.${{ steps.date.outputs.date }} - # labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + tags: | + ${{ steps.meta.outputs.tags }} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:10 + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:10.${{ steps.date.outputs.date }} + # Da caching alligevel ikke virkede, har jeg fjernet cache-to/from + # Det gør buildet mere rent, når vi bruger squash squash: true - - # Sign the resulting Docker image digest except on PRs. - # This will only write to the public Rekor transparency log when the Docker - # repository is public to avoid leaking data. If you would like to publish - # transparency data even for private images, pass --force to cosign below. - # https://github.com/sigstore/cosign - name: Sign the published Docker image if: ${{ github.event_name != 'pull_request' }} env: - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable TAGS: ${{ steps.meta.outputs.tags }} DIGEST: ${{ steps.build-and-push.outputs.digest }} - # This step uses the identity token to provision an ephemeral certificate - # against the sigstore community Fulcio instance. run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}