-
Notifications
You must be signed in to change notification settings - Fork 26
50 lines (41 loc) · 1.2 KB
/
pbom-content.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
name: Release PBOM artifacts
on:
# Runs on pushes targeting the default branch
push:
branches: [ "main" ]
paths:
- content/**
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Single deploy job since we're just deploying
build:
runs-on: ubuntu-latest
permissions:
deployments: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create site content
run: |
python ./helpers/create_pbom_release.py --source content/oscar/ --dest .
tar cvzf pbom_data.tar.gz pbom_data/
ls -al
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pbom_data.tar.gz
path: ./pbom_data.tar.gz
- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::OSCAR_$(date +"%Y.%m.%d_%H-%M")"
- name: Release and add tar
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: |
pbom_data.tar.gz