Skip to content

Commit f337f6c

Browse files
committed
Update release actions
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
1 parent 1620697 commit f337f6c

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,26 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2.4.0
16-
17-
# Required for the changelog to work correctly
18-
- run: git fetch --prune --unshallow
16+
with:
17+
fetch-depth: 0
1918

2019
- uses: actions/setup-go@v2.1.5
20+
21+
- uses: docker/login-action@v1
2122
with:
22-
go-version: 1.15
23+
username: ${{ secrets.DOCKER_LOGIN }}
24+
password: ${{ secrets.DOCKER_PASSWORD }}
2325

24-
- env:
25-
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
26-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
27-
run: docker login --username "$DOCKER_LOGIN" --password "$DOCKER_PASSWORD"
26+
- uses: docker/login-action@v1
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.repository_owner }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
2831

2932
- uses: goreleaser/goreleaser-action@v2.8.0
33+
if: startsWith(github.ref, 'refs/tags/')
3034
with:
3135
version: latest
3236
args: release --rm-dist
3337
env:
34-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ dockers:
2424
- 'mxpv/podsync:{{ .Tag }}'
2525
- 'mxpv/podsync:v{{ .Major }}.{{ .Minor }}'
2626
- 'mxpv/podsync:latest'
27-
binaries:
28-
- podsync
29-
dockerfile: Dockerfile
27+
- 'ghcr.io/mxpv/podsync:{{ .Tag }}'
28+
- 'ghcr.io/mxpv/podsync:latest'
3029

3130
archives:
3231
- replacements:
@@ -43,7 +42,7 @@ checksum:
4342
name_template: 'checksums.txt'
4443

4544
snapshot:
46-
name_template: "{{ .Tag }}-next"
45+
name_template: '{{ .Tag }}-next'
4746

4847
changelog:
4948
sort: asc

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
FROM golang:1.17.5-alpine3.15 AS builder
2-
WORKDIR /app
3-
COPY . /app/
4-
RUN go build -o podsync ./cmd/podsync
1+
# This is a template to be used by GoReleaser.
2+
# See docs for details: https://goreleaser.com/customization/docker/
53

64
FROM alpine:3.10
7-
WORKDIR /app/
85
RUN wget -O /usr/bin/youtube-dl https://github.com/ytdl-org/youtube-dl/releases/latest/download/youtube-dl && \
96
chmod +x /usr/bin/youtube-dl && \
107
apk --no-cache add ca-certificates python ffmpeg tzdata
11-
COPY --from=builder /app/podsync /app/podsync
8+
COPY podsync /podsync
129

13-
ENTRYPOINT ["/app/podsync"]
10+
ENTRYPOINT ["/podsync"]
1411
CMD ["--no-banner"]

0 commit comments

Comments
 (0)