diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 201f06c..99995d9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -36,3 +36,4 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_OWNER: ${{ github.repository_owner }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ebf9288..025f61b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -19,51 +19,51 @@ changelog: - '^test:' dockers: - image_templates: - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-amd64 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-amd64 build_flag_templates: - --platform=linux/amd64 - --label=org.opencontainers.image.title={{ .ProjectName }} - --label=org.opencontainers.image.description={{ .ProjectName }} - - --label=org.opencontainers.image.url=https://github.com/Collabora/k8s-socketcan/ - - --label=org.opencontainers.image.source=https://github.com/Collabora/k8s-socketcan/ + - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_OWNER }}/k8s-socketcan/ + - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_OWNER }}/k8s-socketcan/ - --label=org.opencontainers.image.version={{ .Version }} - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} - --label=org.opencontainers.image.revision={{ .FullCommit }} - --label=org.opencontainers.image.licenses=MIT - image_templates: - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-arm64v8 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-arm64v8 goarch: arm64 build_flag_templates: - --platform=linux/arm64/v8 - --label=org.opencontainers.image.title={{ .ProjectName }} - --label=org.opencontainers.image.description={{ .ProjectName }} - - --label=org.opencontainers.image.url=https://github.com/Collabora/k8s-socketcan/ - - --label=org.opencontainers.image.source=https://github.com/Collabora/k8s-socketcan/ + - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_OWNER }}/k8s-socketcan/ + - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_OWNER }}/k8s-socketcan/ - --label=org.opencontainers.image.version={{ .Version }} - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} - --label=org.opencontainers.image.revision={{ .FullCommit }} - --label=org.opencontainers.image.licenses=MIT - image_templates: - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-386 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-386 goarch: "386" build_flag_templates: - --platform=linux/386 - --label=org.opencontainers.image.title={{ .ProjectName }} - --label=org.opencontainers.image.description={{ .ProjectName }} - - --label=org.opencontainers.image.url=https://github.com/Collabora/k8s-socketcan/ - - --label=org.opencontainers.image.source=https://github.com/Collabora/k8s-socketcan/ + - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_OWNER }}/k8s-socketcan/ + - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_OWNER }}/k8s-socketcan/ - --label=org.opencontainers.image.version={{ .Version }} - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} - --label=org.opencontainers.image.revision={{ .FullCommit }} - --label=org.opencontainers.image.licenses=MIT docker_manifests: -- name_template: ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }} +- name_template: ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }} image_templates: - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-amd64 - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-386 -- name_template: ghcr.io/Collabora/{{ .ProjectName }}:latest + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-amd64 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-arm64v8 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-386 +- name_template: ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:latest image_templates: - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-amd64 - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - ghcr.io/Collabora/{{ .ProjectName }}:{{ .Version }}-386 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-amd64 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-arm64v8 + - ghcr.io/{{ .Env.GITHUB_OWNER }}/{{ .ProjectName }}:{{ .Version }}-386