Skip to content

Commit

Permalink
[Draft] Getting the current branch correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AKramarenko committed Apr 25, 2024
1 parent 6ed4cfa commit fc40179
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: default

on:
push:
branches: [ master ]
paths-ignore:
- CHANGELOG.md
- CONTRIBUTING.md
Expand Down Expand Up @@ -82,8 +81,6 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: "1.19"
- name: Set API_BRANCH
run: echo "API_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Check if Same Branch Exists in Fatmouse Repo
id: check-branch
uses: actions/github-script@v7
Expand All @@ -92,7 +89,7 @@ jobs:
script: |
const owner = "Scalr";
const repo = "fatmouse";
const targetBranch = "${{ env.API_BRANCH }}";
const targetBranch = "${{ github.head_ref || github.ref_name }}";
const default_branch = "master";
try {
Expand Down Expand Up @@ -162,7 +159,7 @@ jobs:
-v $GITHUB_OUTPUT:/fatmouse/output \
-v ~/.scalr-labs:/etc/scalr-labs \
fatmouse/python-builder:master python -u clickfile.py te up \
--branch ${{ steps.check-branch.outputs.branch }} \
--branch ${{ github.head_ref || github.ref_name }} \
--run-url ${{ steps.get-job-id.outputs.html_url }} \
--skip-ui-build \
--agent-pool-id="${{vars.TACO_APOOL_ID}}" \
Expand Down

0 comments on commit fc40179

Please sign in to comment.