Final answer:
To access environment variables in GitHub actions, use the ${{ secrets.VARIABLE_NAME }} syntax.
Step-by-step explanation:
To access environment variables in GitHub actions, you can use the ${{ secrets.VARIABLE_NAME }} syntax. These variables can be defined in the 'Secrets' tab of your repository settings. Here's an example:
name: My Workflow
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Print Secret
run: |
echo ${{ secrets.MY_SECRET}}