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

Clean up GitHub Actions. #2921

Merged
merged 8 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ jobs:
run: brew install fish
if: runner.os == 'macOS'

- # === Install Deps ===
name: Install Deps
shell: bash
run: state run install-deps

- # === Preprocess ===
name: Preprocess
shell: bash
Expand Down Expand Up @@ -420,16 +415,6 @@ jobs:
name: Install State Tool
uses: ActiveState/setup-state-tool@v1

- # === Setup ===
name: Setup
shell: bash
run: |
bin=$(pwd)/.github/deps/${{ runner.os }}/bin
echo "Adding $bin to PATH"
echo "$bin" >> $GITHUB_PATH
ls -ahl $bin
printenv

- # === Download All Build Session Artifacts ===
name: Download All Build Session Artifacts
uses: actions/download-artifact@v2
Expand All @@ -445,11 +430,6 @@ jobs:
find . -mindepth 2 -maxdepth 2 -print0 | xargs -0 -I file rsync -av file .
rm -Rf session*

- # === Install Deps ===
name: Install Deps
shell: bash
run: state run install-deps

- # === Preprocess ===
name: Preprocess
shell: bash
Expand Down
26 changes: 1 addition & 25 deletions .github/workflows/propagate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ jobs:
propagate:
name: Propagate to affected version branches
runs-on: ubuntu-20.04
strategy:
matrix:
go-version:
- 1.20.x
env:
ACTIVESTATE_CI: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to remove this one here but I think we should include it on workflows that use the state tool as consumers of our analytics could be using this now or may want to in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I don't see a usage of state tool without the ACTIVESTATE_CI environment variable defined. Would you please point it out?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just searched and it looks like it's all there. Sorry, when I saw it removed I didn't look in the other files.

ACTIVESTATE_CLI_DISABLE_RUNTIME: true
SHELL: bash
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }}
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
Expand All @@ -40,33 +33,16 @@ jobs:
name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- # === Install State Tool ===
name: Install State Tool
uses: ActiveState/setup-state-tool@v1
go-version: '1.20.x'

- # === Setup ===
name: Setup
shell: bash
run: |
bin=$(pwd)/.github/deps/${{ runner.os }}/bin
echo "Adding $bin to PATH"
echo "$bin" >> $GITHUB_PATH
# We specify our custom user because we need privileges to push to protected branches
git config user.name "AS-builds"
git config user.email "[email protected]"

- # === Install Deps ===
name: Install Deps
shell: bash
run: state run install-deps

- # === Preprocess ===
name: Preprocess
shell: bash
run: state run preprocess -v

- # === Propagate PR ===
name: Propagate PR
id: propagate_pr
Expand Down
29 changes: 2 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ jobs:
if: github.event.ref_type == 'tag' && contains(github.event.ref, 'release/remote-installer')
permissions:
id-token: write # This is required for requesting the JWT
strategy:
matrix:
go-version:
- 1.20.x
env:
ACTIVESTATE_CI: true
ACTIVESTATE_CLI_DISABLE_RUNTIME: true
SHELL: bash
GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION : "us-east-1"
AWS_ROLE_SESSION_NAME: "gha-activestate-cli"
Expand All @@ -37,31 +31,12 @@ jobs:
name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
go-version: '1.20.x'

- # === Install State Tool ===
name: Install State Tool
uses: ActiveState/setup-state-tool@v1

- # === Setup ===
name: Setup
shell: bash
run: |
bin=$(pwd)/.github/deps/${{ runner.os }}/bin
echo "Adding $bin to PATH"
echo "$bin" >> $GITHUB_PATH

- # === Setup Windows ===
name: Setup (Windows)
shell: pwsh
run: |
echo "${PSScriptRoot}/.github/deps/${{ runner.os }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- # === Install Deps ===
name: Install Deps
shell: bash
run: state run install-deps

- # === Preprocess ===
name: Preprocess
shell: bash
Expand All @@ -88,7 +63,7 @@ jobs:
env:
CODE_SIGNING_PASSWD: ${{ secrets.CODE_SIGNING_PASSWD }}
MSI_CERT_BASE64: ${{ secrets.MSI_CERT_BASE64 }}

- # === Configure AWS credentials ==
name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down
9 changes: 0 additions & 9 deletions activestate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ constants:
if: ne .OS.Name "Windows"
value: .sh
scripts:
- name: install-deps
language: bash
if: ne .Shell "cmd"
value: |
if ! type "gozip" &> /dev/null; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was originally needed for the offline-installer, but that was moved to its own repo, so this is no longer needed.

echo "gozip was not found on your PATH, installing .."
go install github.com/ActiveState/gozip/cmd/gozip@e455986
fi
- name: install-deps-dev
language: bash
if: ne .Shell "cmd"
Expand Down Expand Up @@ -410,7 +402,6 @@ events:
if: ne .Shell "cmd"
value: |
$scripts.install-deps-dev.path()
$scripts.install-deps.path()
- name: file-changed
scope: ["internal/locale/locales"]
value: build
Loading