Skip to content

Commit

Permalink
Fix nightly tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mxpv committed May 5, 2023
1 parent 748084d commit 5c29072
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
publish:
name: Nightly
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 20

permissions:
contents: read
Expand All @@ -37,6 +37,9 @@ jobs:

- name: 🏗️ Build and push
uses: docker/build-push-action@v4
env:
TAG: nightly
COMMIT: ${{ github.sha }}
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
tags:
- 'v*'
schedule:
- cron: "0 0 * * *" # Every day at midnight

jobs:
publish:
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM golang:1.20 as builder

ENV TAG="nightly"
ENV COMMIT=""

WORKDIR /build

COPY . .
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ all: build test
GOARCH ?= $(shell go env GOARCH)
GOOS ?= $(shell go env GOOS)

TAG := $(shell git tag --points-at HEAD)
HASH := $(shell git rev-parse --short HEAD)
TAG ?= $(shell git tag --points-at HEAD)
COMMIT ?= $(shell git rev-parse --short HEAD)
DATE := $(shell date)

LDFLAGS := "-X 'main.version=${TAG}' -X 'main.commit=${HASH}' -X 'main.date=${DATE}' -X 'main.arch=${GOARCH}'"
LDFLAGS := "-X 'main.version=${TAG}' -X 'main.commit=${COMMIT}' -X 'main.date=${DATE}' -X 'main.arch=${GOARCH}'"

.PHONY: build
build:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
![Podsync](docs/img/logo.png)

[![](https://github.com/mxpv/podsync/workflows/CI/badge.svg)](https://github.com/mxpv/podsync/actions?query=workflow%3ACI)
[![Nightly](https://github.com/mxpv/podsync/actions/workflows/nightly.yml/badge.svg)](https://github.com/mxpv/podsync/actions/workflows/nightly.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/mxpv/podsync)](https://github.com/mxpv/podsync/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/mxpv/podsync)](https://goreportcard.com/report/github.com/mxpv/podsync)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/mxpv)](https://github.com/sponsors/mxpv)
Expand Down Expand Up @@ -50,6 +51,14 @@ brew install youtube-dl ffmpeg go
- [Podsync on QNAP NAS Guide](./docs/how_to_setup_podsync_on_qnap_nas.md)
- [Schedule updates with cron](./docs/cron.md)

## Nightly builds

Nightly builds uploaded every midnight from the `main` branch and available for testing:

```bash
$ docker run -it --rm ghcr.io/mxpv/podsync:nightly
```

### Access tokens

In order to query YouTube or Vimeo API you have to obtain an API token first.