Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp committed Apr 9, 2024
1 parent fa49430 commit 75c4e54
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 59 deletions.
74 changes: 37 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@ on:
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Shellcheck
run: make shellcheck

- name: Update README
run: make update-readme

- name: Check if README is up-to date
run: git diff --exit-code README.md

snapshot:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --snapshot --clean
# lint:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# steps:
# - uses: actions/checkout@v4

# - name: Shellcheck
# run: make shellcheck

# - name: Update README
# run: make update-readme

# - name: Check if README is up-to date
# run: git diff --exit-code README.md

# snapshot:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# persist-credentials: false

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

# - name: GoReleaser
# uses: goreleaser/goreleaser-action@v5
# with:
# version: latest
# args: release --snapshot --clean

build:
if: github.event_name != 'pull_request'
Expand Down
40 changes: 18 additions & 22 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ changelog:
dockers:
- use: buildx
image_templates:
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-amd64'
build_flag_templates:
- --label=org.opencontainers.image.created={{.Date}}
Expand All @@ -73,9 +71,7 @@ dockers:

- use: buildx
image_templates:
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-arm64'
build_flag_templates:
- --label=org.opencontainers.image.created={{.Date}}
Expand Down Expand Up @@ -104,14 +100,14 @@ docker_manifests:
# Full Version
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}'
image_templates:
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .FullCommit }}-arm64'

# MAJOR.MINOR
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}{{ if .Prerelease }}-unstable{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .FullCommit }}-arm64'

# MAJOR
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Major }}{{ if .Prerelease }}-unstable{{ end }}'
Expand All @@ -128,38 +124,38 @@ docker_manifests:
# Latest
- name_template: 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ if .Prerelease }}unstable{{else}}latest{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/{{.ProjectName}}:{{ .FullCommit }}-arm64'

# Full Version
- name_template: 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}'
image_templates:
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-arm64'

# MAJOR.MINOR
- name_template: 'ghcr.io/tprasadtp/protonvpn:{{ .Major }}.{{ .Minor }}{{ if .Prerelease }}-unstable{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-arm64'

# MAJOR
- name_template: 'ghcr.io/tprasadtp/protonvpn:{{ .Major }}{{ if .Prerelease }}-unstable{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-arm64'

# Commit SHA
- name_template: 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}'
image_templates:
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/{{ .ProjectName }}:{{ .FullCommit }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-arm64'

# Latest
- name_template: 'ghcr.io/tprasadtp/protonvpn:{{ if .Prerelease }}unstable{{else}}latest{{ end }}'
image_templates:
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .Version }}-arm64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-amd64'
- 'ghcr.io/tprasadtp/protonvpn:{{ .FullCommit }}-arm64'

checksum:
disable: true
Expand All @@ -184,7 +180,7 @@ docker_signs:
output: true
args:
- "sign"
- "${artifact}@${digest}"
- "${artifact}"
- --yes

- id: manifests
Expand All @@ -193,5 +189,5 @@ docker_signs:
output: true
args:
- "sign"
- "${artifact}@${digest}"
- "${artifact}"
- --yes

0 comments on commit 75c4e54

Please sign in to comment.