From 69ff8d688ec489b9e25cd22568f47edaf59d82ef Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Thu, 30 Nov 2023 18:24:28 +0100 Subject: [PATCH 1/2] BC-5919 update python and github actions --- .github/workflows/push.yml | 8 ++++---- .github/workflows/tag.yml | 10 +++++----- Dockerfile | 2 +- app.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a0ad3ce..51ffac2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,18 +15,18 @@ jobs: permissions: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Docker meta Service Name id: docker_meta_img - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository }} tags: | type=ref,event=branch,enable=false,priority=600 type=sha,enable=true,priority=600,prefix= - name: Log into registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -38,7 +38,7 @@ jobs: - name: Build and push ${{ github.repository }} if: ${{ env.IMAGE_EXISTS == 0 }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index d806157..d727f8d 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -14,10 +14,10 @@ jobs: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Docker meta Service Name for docker hub id: docker_meta_img_hub - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: docker.io/schulcloud/version-aggregator, quay.io/schulcloudverbund/version-aggregator tags: | @@ -25,20 +25,20 @@ jobs: type=semver,pattern={{major}}.{{minor}} - name: Log into docker registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - name: Log into quay registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} - name: Build and push ${{ github.repository }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile diff --git a/Dockerfile b/Dockerfile index 1957918..7ae63b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine +FROM docker.io/python:3.12-alpine WORKDIR /usr/src/app COPY app.py app.py diff --git a/app.py b/app.py index b144279..fbeeafa 100644 --- a/app.py +++ b/app.py @@ -33,7 +33,7 @@ def do_GET(self): self.send_response(200) self.send_header('Content-Type', 'application/json') self.end_headers() - self.wfile.write(json.dumps(result).encode(encoding='UTF-8')) + self.wfile.write(json.dumps(result, sort_keys=True, indent=4).encode(encoding='UTF-8')) else: self.send_response(404) self.end_headers() From a7f81df10d0563c5db2c56f0a578010a3d9aada7 Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Thu, 30 Nov 2023 18:27:54 +0100 Subject: [PATCH 2/2] replace set-output with echo --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 51ffac2..d01481f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -54,7 +54,7 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT id: extract_branch deploy: