This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [docker/login-action](https://github.com/docker/login-action) | action | minor | `v4.0.0` → `v4.1.0` | --- ### Release Notes <details> <summary>docker/login-action (docker/login-action)</summary> ### [`v4.1.0`](https://github.com/docker/login-action/releases/tag/v4.1.0) [Compare Source](https://github.com/docker/login-action/compare/v4.0.0...v4.1.0) - Fix scoped Docker Hub cleanup path when registry is omitted by [@​crazy-max](https://github.com/crazy-max) in [#​945](https://github.com/docker/login-action/pull/945) - Bump [@​aws-sdk/client-ecr](https://github.com/aws-sdk/client-ecr) and [@​aws-sdk/client-ecr-public](https://github.com/aws-sdk/client-ecr-public) to 3.1020.0 in [#​930](https://github.com/docker/login-action/pull/930) - Bump [@​docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.77.0 to 0.86.0 in [#​932](https://github.com/docker/login-action/pull/932) [#​936](https://github.com/docker/login-action/pull/936) - Bump brace-expansion from 1.1.12 to 1.1.13 in [#​952](https://github.com/docker/login-action/pull/952) - Bump fast-xml-parser from 5.3.4 to 5.3.6 in [#​942](https://github.com/docker/login-action/pull/942) - Bump flatted from 3.3.3 to 3.4.2 in [#​944](https://github.com/docker/login-action/pull/944) - Bump glob from 10.3.12 to 10.5.0 in [#​940](https://github.com/docker/login-action/pull/940) - Bump handlebars from 4.7.8 to 4.7.9 in [#​949](https://github.com/docker/login-action/pull/949) - Bump http-proxy-agent and https-proxy-agent to 8.0.0 in [#​937](https://github.com/docker/login-action/pull/937) - Bump lodash from 4.17.23 to 4.18.1 in [#​958](https://github.com/docker/login-action/pull/958) - Bump minimatch from 3.1.2 to 3.1.5 in [#​941](https://github.com/docker/login-action/pull/941) - Bump picomatch from 4.0.3 to 4.0.4 in [#​948](https://github.com/docker/login-action/pull/948) - Bump undici from 6.23.0 to 6.24.1 in [#​938](https://github.com/docker/login-action/pull/938) **Full Changelog**: <https://github.com/docker/login-action/compare/v4.0.0...v4.1.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImFjdGlvbiIsImRlcHMiXX0=--> Reviewed-on: #101 Reviewed-by: t.behrendt <t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
144 lines
4.8 KiB
YAML
144 lines
4.8 KiB
YAML
name: CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- "**/*.go"
|
|
- "config.example.yaml"
|
|
- "Dockerfile"
|
|
- "Makefile"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
DOCKER_REGISTRY: gitea.t000-n.de
|
|
|
|
jobs:
|
|
test:
|
|
name: test
|
|
runs-on:
|
|
- ubuntu-latest
|
|
- linux_amd64
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Setup go
|
|
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
- name: Create cache key
|
|
uses: https://gitea.com/actions/go-hashfiles@264ae76b7e50173ce71ed7da4b48e5e517f3f9ec # v0.0.1
|
|
id: hash-go
|
|
with:
|
|
patterns: |
|
|
go.mod
|
|
go.sum
|
|
- name: cache go
|
|
id: cache-go
|
|
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
|
|
with:
|
|
path: |
|
|
/go_path
|
|
/go_cache
|
|
key: go_path-${{ steps.hash-go.outputs.hash }}
|
|
restore-keys: |-
|
|
go_cache-${{ steps.hash-go.outputs.hash }}
|
|
- name: build
|
|
run: make build
|
|
- name: test
|
|
run: make test
|
|
|
|
build_and_push:
|
|
name: Build and push
|
|
strategy:
|
|
matrix:
|
|
arch: [ amd64, arm64 ]
|
|
needs:
|
|
- test
|
|
runs-on:
|
|
- ubuntu-latest
|
|
- linux_${{ matrix.arch }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
|
|
- name: Login to Registry
|
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
|
with:
|
|
registry: ${{ env.DOCKER_REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Get Metadata
|
|
id: meta
|
|
run: |
|
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
- name: Build and push
|
|
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/${{ matrix.arch }}
|
|
push: true
|
|
provenance: false
|
|
build-args: GOARCH=${{ matrix.arch }}
|
|
tags: |
|
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-${{ matrix.arch }}
|
|
|
|
create_tag:
|
|
name: Create tag
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
tag: ${{ steps.tag.outputs.new-tag }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@11c694022eefab5876ac346fc9ffc0464b2548c7 # 0.1.30
|
|
id: tag
|
|
with:
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
|
|
- run: |
|
|
git tag ${{ steps.tag.outputs.new-tag }}
|
|
git push origin ${{ steps.tag.outputs.new-tag }}
|
|
- name: Set output
|
|
run: |
|
|
echo "tag=${{ steps.tag.outputs.new-tag }}" >> $GITHUB_OUTPUT
|
|
|
|
create_manifest:
|
|
name: Create manifest
|
|
needs:
|
|
- build_and_push
|
|
- create_tag
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Get Metadata
|
|
id: meta
|
|
run: |
|
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
|
with:
|
|
registry: ${{ env.DOCKER_REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Create manifest
|
|
run: |
|
|
docker manifest create ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }} \
|
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-amd64 \
|
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-arm64
|
|
|
|
docker manifest push ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }}
|