1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Fix nightly tag

This commit is contained in:
Maksym Pavlenko
2023-05-05 15:47:54 -07:00
parent 748084df0f
commit 5c29072bca
5 changed files with 19 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ jobs:
publish: publish:
name: Nightly name: Nightly
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 20
permissions: permissions:
contents: read contents: read
@@ -37,6 +37,9 @@ jobs:
- name: 🏗️ Build and push - name: 🏗️ Build and push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
env:
TAG: nightly
COMMIT: ${{ github.sha }}
with: with:
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View File

@@ -4,8 +4,6 @@ on:
push: push:
tags: tags:
- 'v*' - 'v*'
schedule:
- cron: "0 0 * * *" # Every day at midnight
jobs: jobs:
publish: publish:

View File

@@ -1,5 +1,8 @@
FROM golang:1.20 as builder FROM golang:1.20 as builder
ENV TAG="nightly"
ENV COMMIT=""
WORKDIR /build WORKDIR /build
COPY . . COPY . .

View File

@@ -12,11 +12,11 @@ all: build test
GOARCH ?= $(shell go env GOARCH) GOARCH ?= $(shell go env GOARCH)
GOOS ?= $(shell go env GOOS) GOOS ?= $(shell go env GOOS)
TAG := $(shell git tag --points-at HEAD) TAG ?= $(shell git tag --points-at HEAD)
HASH := $(shell git rev-parse --short HEAD) COMMIT ?= $(shell git rev-parse --short HEAD)
DATE := $(shell date) 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 .PHONY: build
build: build:

View File

@@ -3,6 +3,7 @@
![Podsync](docs/img/logo.png) ![Podsync](docs/img/logo.png)
[![](https://github.com/mxpv/podsync/workflows/CI/badge.svg)](https://github.com/mxpv/podsync/actions?query=workflow%3ACI) [![](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) [![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) [![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) [![GitHub Sponsors](https://img.shields.io/github/sponsors/mxpv)](https://github.com/sponsors/mxpv)
@@ -50,6 +51,14 @@ brew install youtube-dl ffmpeg go
- [Podsync on QNAP NAS Guide](./docs/how_to_setup_podsync_on_qnap_nas.md) - [Podsync on QNAP NAS Guide](./docs/how_to_setup_podsync_on_qnap_nas.md)
- [Schedule updates with cron](./docs/cron.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 ### Access tokens
In order to query YouTube or Vimeo API you have to obtain an API token first. In order to query YouTube or Vimeo API you have to obtain an API token first.