diff --git a/.gitea/workflows/obs-service.yaml b/.gitea/workflows/obs-service.yaml new file mode 100644 index 0000000..82af84e --- /dev/null +++ b/.gitea/workflows/obs-service.yaml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0666893 --- /dev/null +++ b/Dockerfile @@ -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 + + diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..00254ef --- /dev/null +++ b/action.yml @@ -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}}