gitea/pipeline.yml

64 lines
1.8 KiB
YAML

---
resource_types:
- name: aptly-resource
type: docker-image
source:
repository: git.datentonne.net/docker-public/aptly-resource
tag: latest
resources:
- name: go-gitea
type: github-release
source:
owner: go-gitea
repository: gitea
access_token: ((github.access_token))
- name: gitea-deb
type: aptly-resource
source:
api_uri: https://apt-api.datentonne.net/
repo_uri: https://apt.datentonne.net/
repo: datentonne
distribution: debian
component: main
architecture: amd64
package: gitea
username: ((aptly.username))
password: ((aptly.password))
timeout: 1801
keep_versions: 5
jobs:
- name: build
plan:
- get: go-gitea
trigger: true
params:
globs:
- gitea-1*-linux-amd64
- task: build
config:
platform: linux
image_resource:
type: registry-image
source:
repository: git.datentonne.net/docker-public/fpm-docker
tag: latest
inputs:
- name: go-gitea
outputs:
- name: deb
run:
path: /bin/sh
args:
- -c
- |
export VERSION="$(cat go-gitea/version)"
export VERSION_OUT="$(cat go-gitea/version)-$(date +%s)"
chmod +x go-gitea/gitea-${VERSION}-linux-amd64
fpm --verbose -f -n gitea -s dir -t deb -v $VERSION_OUT go-gitea/gitea-${VERSION}-linux-amd64=/usr/bin/gitea
mv -v gitea_${VERSION_OUT}_amd64.deb deb/
echo "deb/gitea_${VERSION_OUT}_amd64.deb" > deb/filename
- put: gitea-deb
params:
archive_file: deb/filename
gpg_passphrase_file: /etc/hosts