Skip to content

Commit

Permalink
Update Github actions (#10)
Browse files Browse the repository at this point in the history
* [GithubActions] Update deploy step
* Clean up path from download
* Added condition for deploy job
* Added repository owner check
* Update build.yml docker image build and push job
* Update github action versions
* Update setup-go to V4
  • Loading branch information
JckHoe authored Nov 30, 2023
1 parent 0647228 commit 466168e
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ^1.21
id: go
Expand All @@ -25,7 +25,7 @@ jobs:
run: make

- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: bin/k6
Expand All @@ -36,26 +36,29 @@ jobs:
if: ${{ github.repository_owner == 'MATRIXXSoftware' && github.event_name != 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
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
uses: docker/login-action@v3
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
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/matrixxsoftware/xk6-diameter:latest
build-args: |
K6_BINARY=bin/k6

0 comments on commit 466168e

Please sign in to comment.