feat: add config converter #103
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
packages: write | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
npm-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm ci --force # needed for react-hook-form to play nicely with newer react versions | |
- run: npm test | |
- run: npm run lint | |
publish-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: "backend/go.mod" | |
cache: true | |
- uses: ko-build/[email protected] | |
with: | |
version: v0.15.1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare | |
run: | | |
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV | |
- name: Build and push | |
working-directory: backend | |
run: | | |
export KO_DOCKER_REPO=ghcr.io/grafana/agent-configurator | |
ko build --sbom=none --bare --platform linux/amd64 -t snapshot \ | |
--image-label org.opencontainers.image.title=agent-configurator-backend \ | |
--image-label org.opencontainers.image.description="Backend for the agent-configurator" \ | |
--image-label org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }} \ | |
--image-label org.opencontainers.image.revision=${{ github.sha }} \ | |
--image-label org.opencontainers.image.version=${{ github.ref_name }} \ | |
--image-label org.opencontainers.image.created=${{ env.BUILD_DATE }} |