Skip to content

Update Github workflow #5

Update Github workflow

Update Github workflow #5

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.21
id: go
- name: Build Source Code
run: make
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: bin/k6
deploy:
runs-on: ubuntu-latest
needs: build
if: ${{ github.repository_owner == 'MATRIXXSoftware' && github.event_name != 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: build-artifacts
- name: Set up Docker Build
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
env:
IMAGE_NAME: ghcr.io/matrixxsoftware/xk6-diameter:latest
run: |
make docker
docker push $IMAGE_NAME