Adding Dockerfile action.yml and obs-service to test custom docker
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 0s
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 0s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
This commit is contained in:
parent
1fae16c9eb
commit
511ca74741
18
.gitea/workflows/obs-service.yaml
Normal file
18
.gitea/workflows/obs-service.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
name: OSC Pull Custom Image Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
jobs:
|
||||
osc_job:
|
||||
runs-on: ubuntu-latest
|
||||
name: opensuse osc custom container checkout test
|
||||
steps:
|
||||
- name: Build action step
|
||||
uses: https://src.opensuse.org/alexlau/bc@factory
|
||||
with:
|
||||
osc-user: 'alexlau'
|
||||
osc-path: 'home:alexlau:branches:Base:System'
|
||||
osc-package: 'bc'
|
||||
env: # Or as an environment variable
|
||||
osc-pass: ${{ secrets.OSCPASS }}
|
||||
id: osc-demo
|
||||
- name: Get the output time
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM opensuse/tumbleweed:latest
|
||||
|
||||
USER 0
|
||||
|
||||
RUN zypper --non-interactive update
|
||||
RUN zypper --non-interactive install osc
|
||||
RUN zypper --non-interactive clean --all
|
||||
|
||||
# COPY hello.sh /hello.sh
|
||||
# RUN chmod +x /hello.sh
|
||||
# RUN mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
|
||||
|
||||
ENTRYPOINT echo $osc-user $osc-path $osc-package
|
||||
RUN osc checkout $osc-path $osc-package
|
||||
RUN osc buildlog openSUSE_Factory x86_64
|
||||
|
||||
|
18
action.yml
Normal file
18
action.yml
Normal file
@ -0,0 +1,18 @@
|
||||
# action.yml
|
||||
name: 'OSC Test'
|
||||
description: 'Checkout the rpm and install run from osc'
|
||||
inputs:
|
||||
osc-user: # id of input
|
||||
description: 'Who is the osc user'
|
||||
required: true
|
||||
default: 'alexlau'
|
||||
outputs:
|
||||
time: # id of output
|
||||
description: 'The time we greeted you'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.osc-user}}
|
||||
- ${{ inputs.osc-path}}
|
||||
- ${{ inputs.osc-package}}
|
Loading…
Reference in New Issue
Block a user