Skip to content

Commit

Permalink
Weave into full pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ps-jay committed May 20, 2024
1 parent 6041f19 commit 3cc8a5b
Showing 1 changed file with 73 additions and 7 deletions.
80 changes: 73 additions & 7 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,36 @@ on:
- '**'

jobs:
system-test:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- architecture: amd64
artifact: ebs-bootstrap-linux-x86_64
- architecture: arm64
artifact: ebs-bootstrap-linux-aarch64
name: Build and Test (${{ matrix.architecture }}) πŸ”¨
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.architecture }}
- name: Build and Test πŸ”¨
run: ./build/docker.sh --architecture ${{ matrix.architecture }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
if-no-files-found: error
retention-days: 1

integration-tests:
runs-on: ubuntu-latest
name: Integration Tests πŸ§ͺ
needs:
- test
steps:
- name: Checkout code πŸ›’
uses: actions/checkout@v4
Expand All @@ -20,15 +48,15 @@ jobs:
with:
bats-version: 1.11.0

# - name: Download all workflow run artifacts
# uses: actions/download-artifact@v3
- name: Download binaries πŸ“₯
uses: actions/download-artifact@v4

- name: Download πŸ“₯
- name: Make executable
shell: bash
run: |
curl -fLsS https://github.com/reecetech/ebs-bootstrap/releases/download/v1.0.7/ebs-bootstrap-linux-x86_64 \
-o ebs-bootstrap
set -euo pipefail
mv ebs-bootstrap ebs-bootstrap-download
mv ebs-bootstrap-download/ebs-bootstrap-linux-x86_64 ebs-bootstrap
chmod +x ebs-bootstrap
- name: Setup tests βš™οΈ
Expand All @@ -39,3 +67,41 @@ jobs:

- name: Test xfs 🧫
run: bats bats/xfs.bats

release:
if: ${{ github.ref_name == github.event.repository.default_branch }} # Only release from the default branch
runs-on: ubuntu-latest
name: Release πŸš€
needs:
- integration-tests
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- id: version
name: Get next version
uses: reecetech/[email protected]
with:
scheme: semver
increment: patch
- id: github-release
name: Create Github Release πŸ“¦
uses: softprops/[email protected]
with:
tag_name: ${{ steps.version.outputs.v-version }}
prerelease: false
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
files: |
*/ebs-bootstrap-linux-*
- id: push-short-tag
name: Create release short tag 🏷
uses: richardsimko/[email protected]
with:
tag_name: ${{ steps.version.outputs.major-v-version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3cc8a5b

Please sign in to comment.