feat!: retrieve remote default branch #357
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: npm ci | |
- run: npm run lint | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
helm: ['2.17.0', '3.4.2', '3.7.1'] | |
env: | |
FIXTURES_GIT_REPO: ${{ format('{0}/{1}', github.server_url, github.event.pull_request.head.repo.full_name || github.repository) }} | |
FIXTURES_GIT_REF: ${{ github.head_ref || github.ref_name }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: azure/[email protected] | |
with: | |
version: ${{ matrix.helm }} | |
id: helm | |
- run: npm ci | |
- name: Replace common utilities by busybox counterparts | |
run: | | |
path="${PWD}/.busybox" | |
mkdir -p $path | |
ln -fs /bin/busybox $path/sh | |
ln -fs /bin/busybox $path/sed | |
ln -fs /bin/busybox $path/grep | |
ln -fs /bin/busybox $path/ls | |
ln -fs /bin/busybox $path/mktemp | |
echo "$path" >> $GITHUB_PATH | |
- run: npm run test | |
- run: npm run test:e2e | |
release: | |
name: release | |
needs: [lint, test] | |
runs-on: ubuntu-latest | |
if: | | |
(!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')) && | |
github.event_name == 'push' && github.ref == 'refs/heads/master' | |
concurrency: | |
group: release-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ github.token }} | |
- run: git fetch --unshallow --tags | |
- run: npm ci | |
- env: | |
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
run: | | |
npm run release |