Skip to content

Commit

Permalink
Try using environments
Browse files Browse the repository at this point in the history
  • Loading branch information
njooma committed Aug 3, 2023
1 parent 82dbe48 commit 76a03f2
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,14 @@ on:
jobs:
prepare:
if: github.repository_owner == 'viamrobotics'
environment: release
runs-on: [self-hosted, x64]
container:
image: ghcr.io/cirruslabs/flutter:3.10.6
outputs:
rc_version: ${{ steps.which_version.outputs.rc_version }}
version: ${{ steps.which_version.outputs.version }}
steps:
- name: Check if organization member
id: is_organization_member
uses: jamessingleton/is-organization-member@1.0.1
with:
organization: viamrobotics
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Cancelling - not an organization member
uses: andymckay/cancel-action@0.2
if: steps.is_organization_member.outputs.result == 'false'

- name: Install GH CLI
run: |
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
Expand Down Expand Up @@ -87,11 +76,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseName: v${{ steps.which_version.outputs.rc_version }}
doNotFailIfNotFound: "true"
# doNotFailIfNotFound: "true"

- name: Cancelling - release already exists
uses: andymckay/cancel-action@0.2
if: steps.release_exists.outputs.id != ''
# - name: Cancelling - release already exists
# uses: andymckay/cancel-action@0.2
# if: steps.release_exists.outputs.id != ''

- name: Add + Commit
uses: EndBug/add-and-commit@v9
Expand All @@ -108,6 +97,7 @@ jobs:
release:
needs: [prepare]
if: github.repository_owner == 'viamrobotics'
environment: release
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
Expand Down

0 comments on commit 76a03f2

Please sign in to comment.