Skip to content

feat: allow for passing a tag reference#9

Open
marcoceppi wants to merge 1 commit into
alexellis:masterfrom
ublue-os:pass-in-tag
Open

feat: allow for passing a tag reference#9
marcoceppi wants to merge 1 commit into
alexellis:masterfrom
ublue-os:pass-in-tag

Conversation

@marcoceppi
Copy link
Copy Markdown

@marcoceppi marcoceppi commented Apr 1, 2023

We use release-please which creates the releases then publishes them. This restricts us from using the on release published target. release-please does include the tag it created the release for. This change allows us to use this action by passing in an optional tag reference instead of it being inferred from the environment.

on:
  push:
    branches:
      - main

permissions:
  contents: write
  checks: write
  actions: read
  packages: write
  pull-requests: write
      
name: Release Please
jobs:
  release-please:
    runs-on: ubuntu-latest
    outputs:
      releases_created: ${{ steps.release-please.outputs.releases_created }}
      tag: ${{ steps.release-please.outputs.tag_name }}
      upload_url: ${{ steps.release-please.outputs.upload_url }}
    steps:
      - uses: google-github-actions/release-please-action@v3
        id: release-please
        with:
          release-type: node
          package-name: release-please-action
          draft: true

  build-iso:
    name: Generate and Release ISOs
    runs-on: ubuntu-latest
    needs: release-please
    if: needs.release-please.outputs.releases_created
    container: fedora:latest
    strategy:
      matrix:
        fedora-version: [ 38 ]
    steps:
      - uses: actions/checkout@v3
      - name: Generate ISO  
        uses: ublue-os/isogenerator@main
        id: isogenerator
        with:
          image-name: bluefin-${{ matrix.fedora-version }}
          installer-repo: development
          installer-major-version: ${{ matrix.fedora-version }}
          kickstart-file-path: bluefin.ks
          
      - name: Upload ISO
        uses: ublue-os/upload-assets@pass-in-tag
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          asset_paths: '["${{ steps.isogenerator.outputs.iso-path }}"]'
          tag: ${{ needs.release-please.outputs.tag }}

Example of how this action is being used

@derek
Copy link
Copy Markdown

derek Bot commented Apr 1, 2023

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "you@domain.com"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

Signed-off-by: Marco Ceppi <marco@ceppi.net>
@derek derek Bot removed the no-dco label Apr 1, 2023
@alexellis
Copy link
Copy Markdown
Owner

Hey thanks for your interest.

It's kind of funny because you know who "we" is but you've not disclosed it to me. So who is we?

Next up: how has this been tested?

I need to see a build with the old behaviour still working and one with your new workflow working.

I'll also take a look at the code changes myself after the above.

Cheers,

Alex

@alexellis
Copy link
Copy Markdown
Owner

@marcoceppi do you still want me to consider your changes?

I need to see some evidence of testing in both conditions - working as usual, and your new scenario.

Just confirming that your change is in place risks regression for every current user of this action.

Alex

@marcoceppi
Copy link
Copy Markdown
Author

marcoceppi commented May 8, 2023

We, ublue-os, have been using the modified version. I'll need to create a test with the tag omitted and will find some time this week to do so.

@alexellis
Copy link
Copy Markdown
Owner

Thanks @marcoceppi

Let's get that done and then we can all keep one version maintained, it'll be less confusing for the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants