-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.44 KB
/
build-and-upload.yaml
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
name: ship-package
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-upload:
runs-on: self-hosted
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for Changed Files
id: changed-files
uses: tj-actions/changed-files@635f118699dd888d737c15018cd30aff2e0274f8
with:
files: |
annotated_logger
Dockerfile
pyproject.toml
requirements.txt
- name: Log into registry
if: steps.changed-files.outputs.any_changed == 'true'
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_PW }}
- name: Build Package
uses: ./ # Action defined in action.yaml in the root
if: steps.changed-files.outputs.any_changed == 'true'
- name: Setup Octofactory config
uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad
if: steps.changed-files.outputs.any_changed == 'true'
env:
JF_ENV_1: ${{ secrets.OCTOFACTORY_SERVER_CONFIG }}
- name: Upload to Octofactory
if: steps.changed-files.outputs.any_changed == 'true'
run: |
jfrog rt u dist/ logger-decorator-pypi