Skip to content

Set up an action for packaging#1

Open
spraints wants to merge 1 commit intooc-ulos:devfrom
spraints:become-an-action
Open

Set up an action for packaging#1
spraints wants to merge 1 commit intooc-ulos:devfrom
spraints:become-an-action

Conversation

@spraints
Copy link

@spraints spraints commented Sep 20, 2023

This branch sets up this repository as an action that can be used in a workflow in individual packages. I opted to make it a composite action because that was an easy way to reuse the existing scripts. The individual steps are based on update.sh, but modified with some different assumptions about the Actions runner environment. The setup script could be converted into a Dockerfile, which would let this action turn into a docker container action. It might also make sense to split the build and push steps into separate actions, especially if it's possible that you'd want to run them separately. I assume that, like the docker build-push-action, most or all uses of the "build" step will also "push".

Note that the action currently doesn't create or update the packages.upl file.

For example, see oc-ulos/coreutils#5.

name: Publish Package

on:
  workflow_dispatch:
  push:
    branches:
      - release

jobs:
  build-and-push-package:
    runs-on: ubuntu-latest
    permissions:
      contents: read

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          path: source

      - name: Build and publish
        uses: oc-ulos/upt-packager@release
        with:
          repo: core
          pkgname: coreutils
          push_url: ${{ secrets.package_push_url }}/core
          push_identity: ${{ secrets.package_push_identity }}

cc @Ocawesome101

@spraints spraints marked this pull request as ready for review September 20, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant