-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (70 loc) · 4.47 KB
/
release_artifactory.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
on:
push:
branches:
- artifactory
name: artifactory release
permissions:
contents: read
jobs:
build:
name: kickable - artifactory release
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
steps:
- name: harden runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: update git branch
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: setup qemu
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: setup earthly
uses: earthly/actions-setup@f2bef5b3261c9d75ac09a578552257195fea300a # v1.0.9
with:
version: "latest"
use-cache: true
- name: docker login
run: docker login kickable.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password "${{ secrets.JFROG_DOCKER_TOKEN }}"
- name: set version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: build and push docker app to artifactory
run: earthly --ci --push --save-inline-cache --use-inline-cache --max-remote-cache +kickable --VERSION="$VERSION" --REPOSITORY="kickable.jfrog.io/kickable-docker-local/kickable"
- name: build and push services to artifactory
run: |
earthly --ci --push --save-inline-cache --use-inline-cache --max-remote-cache +services --VERSION="$VERSION" --REPOSITORY="kickable.jfrog.io/kickable-docker-local/kickable"
- name: build artifacts
run: earthly --ci --output --save-inline-cache --use-inline-cache --max-remote-cache +archive --VERSION="${{ github.ref_name }}"
- name: upload generic artifacts to artifactory
uses: jfrog/setup-jfrog-cli@d82fe26823e1f25529250895d5673f65b02af085 # v4.0.1
env:
JF_URL: ${{ secrets.JF_URL }}
JF_USER: ${{ secrets.JFROG_USERNAME }}
JF_PASSWORD: ${{ secrets.JFROG_DOCKER_TOKEN }}
- run: |
jf rt u dist/kickable-rs_${{ github.ref_name }}_aarch64-apple-darwin.zip kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_aarch64-apple-darwin.zip
jf rt u dist/kickable-rs_${{ github.ref_name }}_aarch64-apple-darwin.zip.sha256 kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_aarch64-apple-darwin.zip.sha256
jf rt u dist/kickable-rs_${{ github.ref_name }}_aarch64-unknown-linux-musl.tar.gz kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_aarch64-unknown-linux-musl.tar.gz
jf rt u dist/kickable-rs_${{ github.ref_name }}_aarch64-unknown-linux-musl.tar.gz.sha256 kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_aarch64-unknown-linux-musl.tar.gz.sha256
jf rt u dist/kickable-rs_${{ github.ref_name }}_x86_64-apple-darwin.zip kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_x86_64-apple-darwin.zip
jf rt u dist/kickable-rs_${{ github.ref_name }}_x86_64-apple-darwin.zip.sha256 kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_x86_64-apple-darwin.zip.sha256
jf rt u dist/kickable-rs_${{ github.ref_name }}_x86_64-pc-windows-gnu.zip kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_x86_64-pc-windows-gnu.zip
jf rt u dist/kickable-rs_${{ github.ref_name }}_x86_64-pc-windows-gnu.zip.sha256 kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_x86_64-pc-windows-gnu.zip.sha256
jf rt u dist/kickable-rs_${{ github.ref_name }}_x86_64-unknown-linux-musl.tar.gz kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_x86_64-unknown-linux-musl.tar.gz
jf rt u dist/kickable-rs_${{ github.ref_name }}_x86_64-unknown-linux-musl.tar.gz.sha256 kickable-generic-local/kickable/${{ github.ref_name }}/kickable-rs_${{ github.ref_name }}_x86_64-unknown-linux-musl.tar.gz.sha256