Prepare release v0.6.0 (#85) #16
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: Create Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: go.mod | ||
# Install cross compiler | ||
- name: Install build dependencies | ||
run: sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu | ||
# Build Agent binaries | ||
- name: Build agent binaries | ||
run: make build-agent-all | ||
# Build Plugins binaries | ||
- name: Build plugin binaries | ||
run: make build-plugins-all | ||
# Build and publish container image | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | ||
- name: Build and push Docker agent image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile.agent | ||
push: true | ||
tags: | ||
- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/agent:${{ github.ref_name }} | ||
- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/agent:latest | ||
# Update infrastructure manifest with new image tag | ||
- name: Update infrastructure manifest | ||
run: IMG_TAG=${{ github.ref_name }} make generate-infra-yaml | ||
# Create release | ||
- name: Create release | ||
run: gh release create ${{ github.ref_name }} --draft --generate-notes ./bin/elemental_agent_linux_* ./bin/*.so ./infrastructure-elemental/v0.0.0/*.yaml |