Skip to content

Commit

Permalink
Update Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dwillcocks committed Apr 27, 2021
1 parent 610bc90 commit 53fb540
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 43 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/readme.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- v*

env:
dockerpushrm_version: "1.7.0"

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,6 +63,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: push README to Dockerhub
run: |
wget https://github.com/christian-korneck/docker-pushrm/releases/download/v${dockerpushrm_version}/docker-pushrm_linux_amd64
mkdir -p $HOME/.docker/cli-plugins/
mv docker-pushrm_linux_amd64 $HOME/.docker/cli-plugins/docker-pushrm
chmod +x $HOME/.docker/cli-plugins/docker-pushrm
docker pushrm danopstech/speedtest_exporter --file "./README.md" --short "${{ github.event.repository.description }}"
- name: Slack Finish Report
uses: act10ns/slack@v1
if: always()
Expand Down
70 changes: 62 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ builds:
- linux
- windows
- darwin
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 7

archives:
-
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
darwin: Darwin
linux: Linux
Expand All @@ -26,12 +33,59 @@ archives:
format: zip
files:
- none*
dockers:
- image_templates:
- ghcr.io/danopstech/{{.ProjectName}}:latest
- ghcr.io/danopstech/{{.ProjectName}}:{{ .Tag }}
- danopstech/{{.ProjectName}}:latest
- danopstech/{{.ProjectName}}:{{ .Tag }}

checksum:
name_template: 'checksums.txt'

dockers:
- image_templates:
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-amd64
- danopstech/{{.ProjectName}}:v{{ .Version }}-amd64
use_buildx: true
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/amd64"

- image_templates:
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-arm7
- danopstech/{{.ProjectName}}:v{{ .Version }}-arm7
use_buildx: true
dockerfile: Dockerfile
goarch: arm
goarm: 7
build_flag_templates:
- "--platform=linux/arm/v7"

- image_templates:
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-arm64
- danopstech/{{.ProjectName}}:v{{ .Version }}-arm64
use_buildx: true
dockerfile: Dockerfile
goarch: arm64
build_flag_templates:
- "--platform=linux/arm64/v8"

docker_manifests:
# github
- name_template: ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}
image_templates:
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-amd64
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-arm64
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-arm7
- name_template: ghcr.io/danopstech/{{.ProjectName}}:latest
image_templates:
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-amd64
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-arm64
- ghcr.io/danopstech/{{.ProjectName}}:v{{ .Version }}-arm7

# dockerhub
- name_template: danopstech/{{.ProjectName}}:v{{ .Version }}
image_templates:
- danopstech/{{.ProjectName}}:v{{ .Version }}-amd64
- danopstech/{{.ProjectName}}:v{{ .Version }}-arm64
- danopstech/{{.ProjectName}}:v{{ .Version }}-arm7
- name_template: danopstech/{{.ProjectName}}:latest
image_templates:
- danopstech/{{.ProjectName}}:v{{ .Version }}-amd64
- danopstech/{{.ProjectName}}:v{{ .Version }}-arm64
- danopstech/{{.ProjectName}}:v{{ .Version }}-arm7

0 comments on commit 53fb540

Please sign in to comment.