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

Modify workflow call syntax #261

Merged
merged 1 commit into from
Oct 7, 2022
Merged

Modify workflow call syntax #261

merged 1 commit into from
Oct 7, 2022

Conversation

ChadKillingsworth
Copy link
Collaborator

Followup to #258

The release job failed with the following error:

Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/closure-compiler-npm/closure-compiler-npm/.github/workflows/build.yml'.

Updates the syntax slightly to work around this. Won't be testable until the next release though.

@@ -61,5 +61,7 @@ jobs:
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
https://api.github.com/repos/google/closure-compiler-npm/releases \
-d '{"tag_name":"v${{ github.event.inputs.COMPILER_VERSION_NUMBER }}.0.0","name":"${{ github.event.inputs.COMPILER_VERSION_NUMBER }}.0.0","body":"Closure-compiler ${{ github.event.inputs.COMPILER_VERSION_NUMBER }} release","draft":false,"prerelease":false,"generate_release_notes":true}'
- name: Trigger Build and Publish
uses: ./.github/workflows/build.yml
trigger-publication:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I interpret this change as something like the description below.
How far off am I?

The create-release workflow failed with an error message:
Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/closure-compiler-npm/closure-compiler-npm/.github/workflows/build.yml'. Did you forget to run actions/checkout before running your local action?

This was because ... something something... so the final step didn't think that file existed, even though it did.

This change creates a separate workflow specifically for triggering publication,
instead of doing it as a final step of the create-release workflow.

This allows us to add an explicit dependency on the create-release workflow and especially on the
./.github/workflows/build.yml file it creates.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to go re-read the documentation on this: https://docs.github.com/en/actions/using-workflows/reusing-workflows

When I looked very carefully, these had to be set up as 2 separate jobs in the same workflow. I think the previous version I had just misread it.

@brad4d brad4d merged commit 1db4c6d into master Oct 7, 2022
@ChadKillingsworth ChadKillingsworth deleted the automatic-publish-2 branch October 7, 2022 20:00
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.

None yet

2 participants