Skip to content

Commit

Permalink
Update release actions
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Pavlenko <[email protected]>
  • Loading branch information
mxpv committed Dec 31, 2021
1 parent 1620697 commit f337f6c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@ jobs:

steps:
- uses: actions/[email protected]

# Required for the changelog to work correctly
- run: git fetch --prune --unshallow
with:
fetch-depth: 0

- uses: actions/[email protected]

- uses: docker/login-action@v1
with:
go-version: 1.15
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}

- env:
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login --username "$DOCKER_LOGIN" --password "$DOCKER_PASSWORD"
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: goreleaser/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 3 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ dockers:
- 'mxpv/podsync:{{ .Tag }}'
- 'mxpv/podsync:v{{ .Major }}.{{ .Minor }}'
- 'mxpv/podsync:latest'
binaries:
- podsync
dockerfile: Dockerfile
- 'ghcr.io/mxpv/podsync:{{ .Tag }}'
- 'ghcr.io/mxpv/podsync:latest'

archives:
- replacements:
Expand All @@ -43,7 +42,7 @@ checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ .Tag }}-next"
name_template: '{{ .Tag }}-next'

changelog:
sort: asc
Expand Down
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM golang:1.17.5-alpine3.15 AS builder
WORKDIR /app
COPY . /app/
RUN go build -o podsync ./cmd/podsync
# This is a template to be used by GoReleaser.
# See docs for details: https://goreleaser.com/customization/docker/

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

ENTRYPOINT ["/app/podsync"]
ENTRYPOINT ["/podsync"]
CMD ["--no-banner"]

0 comments on commit f337f6c

Please sign in to comment.