Skip to content

ci: add if condition to only run on main #72

ci: add if condition to only run on main

ci: add if condition to only run on main #72

Workflow file for this run

name: Release
on:
br
push:

Check failure on line 5 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 5
tags:
- 'v*'
permissions:
contents: read
id-token: write
jobs:
release:
name: Release
runs-on:
- self-hosted
- medium
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }}
- name: Install asdf & tools
uses: asdf-vm/actions/install@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/kommander-applications
aws-region: us-west-2
- name: Extract tag name
shell: bash
run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: make release
env:
DOCKER_USERNAME: ${{ secrets.NEXUS_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
GIT_TAG: ${{ env.GIT_TAG }}
run: make release