Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Releases: gha-trigger/set-env-action

v0.1.3

24 Sep 00:06
v0.1.3
94b9fe5
Compare
Choose a tag to compare

Issues | Pull Requests | v0.1.2...v0.1.3

Bug Fixes

#18 #19 Improve test and fix bugs

v0.1.2

22 Sep 08:08
v0.1.2
86dd509
Compare
Choose a tag to compare

Issues | Pull Requests | v0.1.1...v0.1.2

Bug Fixes

#13 Fix GHA_REF_NAME if an event is pull_request

Others

#13 Set up CI

v0.1.1

14 Sep 00:27
v0.1.1
684750c
Compare
Choose a tag to compare

Issues | Pull Requests | v0.1.0...v0.1.1

Features

#12 Add GHA_ENV

GHA_ENV: a file path to a shell script to override GitHub Actions default environment variables with GHA_*

Basically, GitHub Actions default environment variables can't be changed.

https://docs.github.com/en/actions/learn-github-actions/environment-variables#naming-conventions-for-environment-variables

When you set a custom environment variable, you cannot use any of the default environment variable names.
For a complete list of these, see "Default environment variables" below.
If you attempt to override the value of one of these default environment variables, the assignment is ignored.
But you can change them in run steps.

Using GHA_ENV in run step, you can override GitHub Actions default environment variables.

e.g.

- run: |
    echo "$GITHUB_REPOSITORY" # CI Repository
    . "$GHA_ENV" # Override default environment variables GITHUB_*
    echo "$GITHUB_REPOSITORY" # Main Repository

This is useful to run tools that depend on GitHub Actions default environment variables.

v0.1.0

10 Sep 11:33
v0.1.0
b3bef19
Compare
Choose a tag to compare