Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow for passing a tag reference #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcoceppi
Copy link

@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

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
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
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
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
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