bash-custom-action/.gitea/workflows/obs-service.yaml
Alex Lau (AvengerMoJo) 0ae0d9ada8
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 42s
Using format_spec_file and source_validator
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2024-01-08 18:16:37 +08:00

49 lines
2.0 KiB
YAML

name: OSC Pull Custom Image Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches: [ factory ]
jobs:
osc_job:
runs-on: osc_patch_label
name: opensuse osc custom container checkout test
steps:
- name: Checkout the repo code
uses: actions/checkout@v3
- name: List all files in the repo
run: |
echo "Workspace: ${{ gitea.workspace }}"
/usr/bin/ls ${{ gitea.workspace }}
- name: Using OBS checkout (remote)
with:
osc_user: 'alexlau'
osc_cred: 'osc.credentials.PlaintextConfigFileCredentialsManager'
osc_path: 'home:alexlau:branches:openSUSE:Factory'
osc_package: 'bash'
env: # Or as an environment variable
osc_pass: ${{ secrets.OSCPASS }}
run:
OSC_CONFIG= OSC_USERNAME=$INPUT_OSC_USER OSC_CREDENTIALS_MGR_CLASS=$INPUT_OSC_CRED OSC_PASSWORD=$osc_pass osc checkout $INPUT_OSC_PATH $INPUT_OSC_PACKAGE
- name: OBS format spec check (local)
with:
osc_user: 'alexlau'
osc_cred: 'osc.credentials.PlaintextConfigFileCredentialsManager'
osc_path: 'home:alexlau:branches:openSUSE:Factory'
osc_package: 'bash'
env: # Or as an environment variable
osc_pass: ${{ secrets.OSCPASS }}
run: |
cd $INPUT_OSC_PATH/$INPUT_OSC_PACKAGE
OSC_CONFIG= OSC_USERNAME=$INPUT_OSC_USER OSC_CREDENTIALS_MGR_CLASS=$INPUT_OSC_CRED OSC_PASSWORD=$osc_pass osc service run format_spec_file
- name: OBS soiurce validate (local)
with:
osc_user: 'alexlau'
osc_cred: 'osc.credentials.PlaintextConfigFileCredentialsManager'
osc_path: 'home:alexlau:branches:openSUSE:Factory'
osc_package: 'bash'
env: # Or as an environment variable
osc_pass: ${{ secrets.OSCPASS }}
run: |
cd $INPUT_OSC_PATH/$INPUT_OSC_PACKAGE
OSC_CONFIG= OSC_USERNAME=$INPUT_OSC_USER OSC_CREDENTIALS_MGR_CLASS=$INPUT_OSC_CRED OSC_PASSWORD=$osc_pass osc service run source_validator