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

ci: deploy job fails for PRs #40

Closed
lread opened this issue Sep 19, 2022 · 2 comments · Fixed by #46
Closed

ci: deploy job fails for PRs #40

lread opened this issue Sep 19, 2022 · 2 comments · Fixed by #46

Comments

@lread
Copy link
Collaborator

lread commented Sep 19, 2022

I think we can just not invoke this job if not on main branch?

I can take a look.

@lread
Copy link
Collaborator Author

lread commented Sep 19, 2022

@slipset, I think CircleCI allows us to trigger a job based on a matching tag only.

We currently have:

workflows:
  build-deploy:
    jobs:
      - build:
          filters:
            tags:
              only: /.*/

      - deploy:
          requires:
            - build
          filters:
            tags:
              only: /Release-.*/
          context:
            - CLOJARS_DEPLOY

Unlike GitHub Actions, for CircleCI we can say, hey, only execute on matching tag please via branches filter:

      - deploy:
          requires:
            - build
          filters:
            tags:
              only: /Release-.*/
            branches:
              ignore: /.*/
          context:
            - CLOJARS_DEPLOY

This is a confusing syntax, but I think it says don't trigger on any branch criteria, just trigger if you see a matching tag.

Is this what you'd like to happen?

@lread
Copy link
Collaborator Author

lread commented Sep 19, 2022

Doing a little grep.apping tells me folks are using this pattern.

Example

I think I'm going to go ahead and PR this.
It should mean deploy will only run when a tag is pushed.

Can adapt if that turns out not to work out for you/us.

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 a pull request may close this issue.

1 participant