Skip to content

chore(deps): update actions/checkout action to v4 #608

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #608

name: pull-request-and-push-to-main
on:
pull_request:
types:
- opened # default
- synchronize # default
- reopened # default
push:
branches:
- main
jobs:
option1:
runs-on: ubuntu-latest
steps:
- uses: 'actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11' # v4
- name: Set upload config
id: set-conf
run: |
if [[ "${{ github.event_name }}" = "pull_request" ]]; then
echo "ENV=dev" >> "$GITHUB_OUTPUT"
else
echo "ENV=prod" >> "$GITHUB_OUTPUT"
fi
- name: Process
run: |
echo "${{ steps.set-conf.outputs.ENV }}"
option2:
runs-on: ubuntu-latest
steps:
- uses: 'actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11' # v4
- name: Set upload config
if: github.event_name == 'pull_request'
id: set-conf-dev
run: |
echo "ENV=dev" >> "$GITHUB_OUTPUT"
- name: Set upload config
if: github.event_name == 'push'
id: set-conf-prod
run: |
echo "ENV=prod" >> "$GITHUB_OUTPUT"
- name: Process
run: |
echo "${{ steps.set-conf-dev.outputs.ENV || steps.set-conf-prod.outputs.ENV }}"