From b9cd4a7d38819292e45727ee2f15768e28ca3d18 Mon Sep 17 00:00:00 2001 From: Marc <980978+MarcHagen@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:29:36 +0100 Subject: [PATCH 1/4] Create CODEOWNERS --- .github/CODEOWNERS | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..88aa3987 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,6 @@ +# People marked here will be automatically requested for a review +# when the code that they own is touched. +# https://github.com/blog/2392-introducing-code-owners +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners + +* @vtsykun From c502df0e804f167bf69f91cf4f9fdf64b4e974ee Mon Sep 17 00:00:00 2001 From: Marc <980978+MarcHagen@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:30:25 +0100 Subject: [PATCH 2/4] Create dependabot.yml --- .github/dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..63efcccc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + labels: [] From 384156982a02782fed176cabe0c8923f232a2e1e Mon Sep 17 00:00:00 2001 From: Marc <980978+MarcHagen@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:39:01 +0100 Subject: [PATCH 3/4] Update workflow Update version pins to more recent Added labels, this will not hurt anything but gives opencontainer data to the container. Useful for docker image tracking. Use GHA as docker layer cache, this will use the action cache of the repo to store interment layers. Way better than the local stuff and moving it afterwards. --- .github/workflows/docker_hub.yaml | 35 +++++++++++++------------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker_hub.yaml b/.github/workflows/docker_hub.yaml index b084c72b..fcde3cb9 100644 --- a/.github/workflows/docker_hub.yaml +++ b/.github/workflows/docker_hub.yaml @@ -15,57 +15,52 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache-qemu key: ${{ runner.os }}-buildx-cache-qemu - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Calculate docker image tag - id: set-tag - uses: docker/metadata-action@master + id: docker_meta + uses: docker/metadata-action@v5 with: images: packeton/packeton flavor: | latest=false tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} - type=pep440,pattern={{major}}.{{minor}} + type=pep440,pattern={{ version }} + type=pep440,pattern={{ major }}.{{ minor }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . -# file: "Dockerfile" + file: Dockerfile push: true - tags: "${{ steps.set-tag.outputs.tags }}" + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} platforms: linux/amd64,linux/arm64 - cache-from: type=local,src=/tmp/.buildx-cache-qemu - cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + cache-from: type=gha,scope=${{ github.workflow }} + cache-to: type=gha,scope=${{ github.workflow }},mode=max # Issue https://github.com/rust-lang/cargo/issues/10583 build-args: | CARGO_NET_GIT_FETCH_WITH_CLI=true - - # 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-qemu - mv /tmp/.buildx-cache-new /tmp/.buildx-cache-qemu From 23890f627bd7659875948a3bc4f4ccff0119dcb0 Mon Sep 17 00:00:00 2001 From: Marc <980978+MarcHagen@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:44:30 +0100 Subject: [PATCH 4/4] Remove cache load step, no need --- .github/workflows/docker_hub.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/docker_hub.yaml b/.github/workflows/docker_hub.yaml index fcde3cb9..1da1208c 100644 --- a/.github/workflows/docker_hub.yaml +++ b/.github/workflows/docker_hub.yaml @@ -25,12 +25,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache-qemu - key: ${{ runner.os }}-buildx-cache-qemu - - name: Login to Docker Hub uses: docker/login-action@v3 with: