Answers: <p>One way to do that is with <code>format</code>, for example.</p>
  <pre><code>${{ format('{0}/artifacts', matrix.plugin.name) }}
  </code></pre>
  <p>Which can be provided to <code>hashFiles</code> like this</p>
  <pre><code>${{ hashFiles(format('{0}/artifacts', matrix.plugin.name)) }}
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2024-12-07T00:04:52.727Z
Answers: 2024-12-07T00:04:52.727Z
Answers: Evan Carroll
Body: <p>How do you concatenate strings in a GitHub CI? I want to concatenate a variable coming from <code>matrix.</code> and with another part of the path. I've tried using <code>join()</code> it doesn't work.</p>
  <pre><code>name: ${{ join( [matrix.plugin.name, '/artifacts'], ',' ) }}
  </code></pre>
  <p>hashFiles(
  I also don't see a concatenation operator anywhere.</p>
  <p>I need to provide this to the <a href="https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#hashfiles" rel="nofollow noreferrer"><code>hashfiles()</code></a> I</p>
  
Tags: <github-actions>
Title: Concat strings in a github context
UserDisplayName: Evan Carroll
ThreadText: # Concat strings in a github context
  
  (Asked by: username_0 on 2024-12-07)
  
  How do you concatenate strings in a GitHub CI? I want to concatenate a variable coming from `matrix.` and with another part of the path. I've tried using `join()` it doesn't work.
  
  ```
  name: ${{ join( [matrix.plugin.name, '/artifacts'], ',' ) }}
  
  ```
  
  hashFiles(
  I also don't see a concatenation operator anywhere.
  
  I need to provide this to the [`hashfiles()`](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#hashfiles) I
  
  **Tags:** github-actions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-12-07. Score: 0
  
  One way to do that is with `format`, for example.
  
  ```
  ${{ format('{0}/artifacts', matrix.plugin.name) }}
  
  ```
  
  Which can be provided to `hashFiles` like this
  
  ```
  ${{ hashFiles(format('{0}/artifacts', matrix.plugin.name)) }}
  
  ```
  
  
  ---
  
  