Skip to content

Commit 4e54306

Browse files
committed
Update action for publiccode
1 parent 378f6e0 commit 4e54306

2 files changed

Lines changed: 17 additions & 34 deletions

File tree

.github/workflows/opencatalogi-publish.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
check-and-update:
1313
runs-on: ubuntu-latest
1414
steps:
15+
# Check out the code
1516
- name: Checkout code
1617
uses: actions/checkout@v2
1718
# Install Python
@@ -37,16 +38,6 @@ jobs:
3738
3839
echo "Installing PyYAML..."
3940
pip install PyYAML
40-
41-
42-
# Bit of test coding to see if everything works
43-
- run: echo Hello ${{ inputs.who-to-greet }}.
44-
shell: bash
45-
- id: random-number-generator
46-
run: echo "random-number=$(echo $RANDOM)" >> $GITHUB_OUTPUT
47-
shell: bash
48-
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
49-
shell: bash
5041
# Create changes if it is a normal repository
5142
- name: Create or update the publiccode file
5243
if: (!contains(github.repository, '.github'))

action.yaml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,29 @@ runs:
4343
python-version: '3.x'
4444
# Transfer the repossitory data to the container
4545
- name: Transfer the repossitory data to the container
46-
env:
47-
REPO_NAME: ${{ github.event.repository.name }}
48-
REPO_DESC: ${{ github.event.repository.description }}
49-
REPO_URL: ${{ github.event.repository.html_url }}
50-
REPO_HOMEPAGE: ${{ github.event.repository.homepage }}
51-
REPO_LICENSE: ${{ github.event.repository.license.key }}
52-
REPO_CREATED_AT: ${{ github.event.repository.created_at }}
53-
ORGANISATION_NAME: ${{ github.event.organization.login }}
54-
ORGANISATION_DESCRIPTION: ${{ github.event.organization.description }}
55-
ORGANISATION_GITID: ${{ github.event.organization.id}}
56-
ORGANISATION_URL: ${{ github.event.organization.login }}
57-
ORGANISATION_AVATAR: ${{ github.event.organization.avatar_url }}
5846
run: |
59-
echo "Installing PyYAML..."
60-
pip install PyYAML
47+
echo "REPO_NAME=${{ github.event.repository.name }}" >> $GITHUB_ENV
48+
echo "REPO_DESC=${{ github.event.repository.description }}" >> $GITHUB_ENV
49+
echo "REPO_URL=${{ github.event.repository.html_url }}" >> $GITHUB_ENV
50+
echo "REPO_HOMEPAGE=${{ github.event.repository.homepage }}" >> $GITHUB_ENV
51+
echo "REPO_LICENSE=${{ github.event.repository.license.key }}" >> $GITHUB_ENV
52+
echo "REPO_CREATED_AT=${{ github.event.repository.created_at }}" >> $GITHUB_ENV
6153
62-
# Bit of test coding to see if everything works
63-
- run: echo Hello ${{ inputs.who-to-greet }}.
64-
shell: bash
65-
- id: random-number-generator
66-
run: echo "random-number=$(echo $RANDOM)" >> $GITHUB_OUTPUT
67-
shell: bash
68-
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
69-
shell: bash
54+
echo "ORGANISATION_NAME=${{ github.event.organization.login }}" >> $GITHUB_ENV
55+
echo "ORGANISATION_DESCRIPTION=${{ github.event.organization.description }}" >> $GITHUB_ENV
56+
echo "ORGANISATION_GITID=${{ github.event.organization.id}}" >> $GITHUB_ENV
57+
echo "ORGANISATION_URL=${{ github.event.organization.login }}" >> $GITHUB_ENV
58+
echo "ORGANISATION_AVATAR=${{ github.event.organization.avatar_url }}" >> $GITHUB_ENV
59+
60+
echo "Installing PyYAML..."
61+
pip install PyYAML
7062
# Create changes if it is a normal repository
71-
- name: Craate or update the publiccode file
63+
- name: Create or update the publiccode file
7264
if: (!contains(github.repository, '.github'))
7365
run: python update_publiccode.py
7466
shell: bash
7567
# Create changes if it is an organisation repository
76-
- name: Craate or update the publicorganisation file
68+
- name: Create or update the publicorganisation file
7769
if: (contains(github.repository, '.github'))
7870
run: python update_publicorganisation.py
7971
shell: bash

0 commit comments

Comments
 (0)