Skip to content

Test a PR publish

Test a PR publish #1

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/build_artifact.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_artifact.yml

Invalid workflow file

`pull` is not a valid event name
on:
push:
tags:
- "v*.*.*-avx"
pull:
branches:
- aviatrix
env:
NAME: below
GITHUB_APP_ID: ${{ secrets.AVIATRIXDEV_WORKFLOW_AUTOMATION_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.AVIATRIXDEV_WORKFLOW_AUTOMATION_PRIVATE_KEY }}
permissions:
id-token: write
contents: read
jobs:
build:
name: Build artifact(s)
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build 18.04 debian
run: |
./scripts/build_deb.sh 18.04
- name: Build 22.04 debian
run: |
./scripts/build_deb.sh 22.04
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db
with:
application_id: ${{ secrets.AVIATRIXDEV_WORKFLOW_AUTOMATION_APP_ID }}
application_private_key: ${{ secrets.AVIATRIXDEV_WORKFLOW_AUTOMATION_PRIVATE_KEY }}
- name: Get version
id: get_version
run: |
echo VERSION="$(echo ${{ github.ref_name }})" >> $GITHUB_OUTPUT
- name: Rename binaries
run: |
cp below_*_amd64_18.04.deb below_amd64_18.04.deb
cp below_*_amd64_22.04.deb below_amd64_22.04.deb
- name: Publish artifact
uses: AviatrixTemplates/build-artifact.publish@v1
with:
files: |
./below_amd64_18.04.deb
./below_amd64_22.04.deb
name: ${{ env.NAME }}
version: ${{ steps.get_version.outputs.VERSION }}
github_token: ${{ steps.get_workflow_token.outputs.token }}
create_update_artifact_pr:
name: Create a pull request to update the build artifact manifest
runs-on: ubuntu-latest
needs: build
steps:
# Github auth is required for build artifact actions
- id: "github_token_auth"
name: "Generate github token"
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db
with:
application_id: ${{ env.GITHUB_APP_ID }}
application_private_key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
- uses: AviatrixTemplates/build-artifact.update-manifest@v1
with:
branch_name: master
artifact_name: ${{ env.NAME }}
artifact_version: v${{ needs.build.outputs.VERSION }}
github_token: ${{ steps.github_token_auth.outputs.token }}