-
Notifications
You must be signed in to change notification settings - Fork 293
116 lines (105 loc) · 4.03 KB
/
delivery-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: delivery / ubuntu
on:
release:
types:
- released
workflow_dispatch:
inputs:
tag_name:
description: The release tag to distribute
required: true
env:
MAINTAINER_NAME: "cncf-buildpacks"
MAINTAINER_EMAIL: "[email protected]"
PACKAGE_NAME: "pack-cli"
jobs:
deliver-ppa:
strategy:
fail-fast: false
matrix:
target: [bionic, focal, jammy, noble]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Metadata
id: metadata
run: |
echo "date=$(date +"%a, %d %b %Y %T %z")" >> $GITHUB_OUTPUT
- name: Determine version
uses: actions/github-script@v7
id: version
with:
result-encoding: string
script: |
let payload = context.payload;
let tag = (payload.release && payload.release.tag_name) || (payload.inputs && payload.inputs.tag_name);
if (!tag) {
throw "ERROR: unable to determine tag"
}
return tag.replace(/^v/, '');
- name: Fill debian/*
uses: cschleiden/replace-tokens@v1
with:
files: '[".github/workflows/delivery/ubuntu/debian/*"]'
tokenPrefix: '{{'
tokenSuffix: '}}'
env:
ARCH: "any"
DATE_TIME: ${{ steps.metadata.outputs.date }}
DESCRIPTION: "CLI for building apps using Cloud Native Buildpacks"
GO_DEP_ENTRY: golang (>=1.16)
GO_DEP_LIB_PATH: /usr/lib/go
GO_DEP_PACKAGE_NAME: golang
HOMEPAGE: "https://buildpacks.io"
PACK_VERSION: ${{ steps.version.outputs.result }}
REPO: "buildpacks/pack"
UBUNTU_VERSION: ${{ matrix.target }}
###
# NOTE: 'uses' does not support interpolation so we have to manually define the
# following steps per variant.
###
- name: Deliver bionic
if: matrix.target == 'bionic'
uses: docker://ubuntu:bionic
with:
entrypoint: .github/workflows/delivery/ubuntu/deliver.sh
env:
DEBIAN_FRONTEND: "noninteractive"
GO_DEP_PACKAGE_NAME: golang
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
PACKAGE_VERSION: ${{ steps.version.outputs.result }}
- name: Deliver focal
if: matrix.target == 'focal'
uses: docker://ubuntu:focal
with:
entrypoint: .github/workflows/delivery/ubuntu/deliver.sh
env:
DEBIAN_FRONTEND: "noninteractive"
GO_DEP_PACKAGE_NAME: golang
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
PACKAGE_VERSION: ${{ steps.version.outputs.result }}
- name: Deliver jammy
if: matrix.target == 'jammy'
uses: docker://ubuntu:jammy
with:
entrypoint: .github/workflows/delivery/ubuntu/deliver.sh
env:
DEBIAN_FRONTEND: "noninteractive"
GO_DEP_PACKAGE_NAME: golang
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
PACKAGE_VERSION: ${{ steps.version.outputs.result }}
- name: Deliver noble
if: matrix.target == 'noble'
uses: docker://ubuntu:noble
with:
entrypoint: .github/workflows/delivery/ubuntu/deliver.sh
env:
DEBIAN_FRONTEND: "noninteractive"
GO_DEP_PACKAGE_NAME: golang
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
PACKAGE_VERSION: ${{ steps.version.outputs.result }}