This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (57 loc) · 2.42 KB
/
push-image.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
name: Push Builder Image
on:
release:
types:
- published
jobs:
push:
name: Push
runs-on: ubuntu-latest
steps:
- name: Parse Event
id: event
run: |
echo "::set-output name=tag::$(jq -r '.release.tag_name' "${GITHUB_EVENT_PATH}" | sed s/^v//)"
- name: Checkout
uses: actions/checkout@v2
- name: Get pack version
id: pack-version
run: |
version=$(jq -r .pack "scripts/.util/tools.json")
echo "::set-output name=version::${version#v}"
- name: Install Global Pack
uses: buildpacks/github-actions/setup-pack@main
with:
pack-version: ${{ steps.pack-version.outputs.version }}
- name: Create Builder Image
run: |
pack builder create builder --config builder.toml
- name: Push
env:
GCR_PUSH_BOT_JSON_KEY: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }}
run: |
echo "${GCR_PUSH_BOT_JSON_KEY}" | docker login --username _json_key --password-stdin gcr.io
docker tag builder "gcr.io/paketo-buildpacks/builder:full-cf"
docker push "gcr.io/paketo-buildpacks/builder:full-cf"
- name: Push
env:
PAKETO_BUILDPACKS_DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }}
PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }}
run: |
echo "${PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD}" | docker login --username "${PAKETO_BUILDPACKS_DOCKERHUB_USERNAME}" --password-stdin
docker tag builder "paketobuildpacks/builder:full"
docker tag builder "paketobuildpacks/builder:full-cf"
docker tag builder "paketobuildpacks/builder:${{ steps.event.outputs.tag }}-full"
docker push "paketobuildpacks/builder:full"
docker push "paketobuildpacks/builder:full-cf"
docker push "paketobuildpacks/builder:${{ steps.event.outputs.tag }}-full"
- name: Push
env:
CLOUDFOUNDRY_DOCKERHUB_USERNAME: ${{ secrets.CLOUDFOUNDRY_DOCKERHUB_USERNAME }}
CLOUDFOUNDRY_DOCKERHUB_PASSWORD: ${{ secrets.CLOUDFOUNDRY_DOCKERHUB_PASSWORD }}
run: |
echo "${CLOUDFOUNDRY_DOCKERHUB_PASSWORD}" | docker login --username "${CLOUDFOUNDRY_DOCKERHUB_USERNAME}" --password-stdin
docker tag builder "cloudfoundry/cnb:full-cf"
docker tag builder "cloudfoundry/cnb:cflinuxfs3"
docker push "cloudfoundry/cnb:full-cf"
docker push "cloudfoundry/cnb:cflinuxfs3"