Skip to content

Bump the github-actions-updates group with 2 updates #34

Bump the github-actions-updates group with 2 updates

Bump the github-actions-updates group with 2 updates #34

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: set up go 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: build and test
run: |
go test -v -race -timeout=100s -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
go build -race ./...
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "mocks" | grep -v "_mock" > $GITHUB_WORKSPACE/profile.cov
working-directory: app
env:
TZ: America/Chicago
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58
- name: install goveralls
run: go install github.com/mattn/goveralls@latest
- name: submit coverage
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build and push master image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
docker build -t radiot/stream-recorder:master .
docker login --username ${{ secrets.DOCKERHUB_USER }} --password ${{ secrets.DOCKERHUB_PASSWD }}
docker push radiot/stream-recorder:master
- name: build and push tagged image
if: github.event_name == 'push' && github.event.ref_type == 'tag'
run: |
GIT_TAG="${GITHUB_REF#refs/tags/}"
docker build -t radiot/stream-recorder:${GIT_TAG} .
docker login --username ${{ secrets.DOCKERHUB_USER }} --password ${{ secrets.DOCKERHUB_PASSWD }}
docker push radiot/stream-recorder:${GIT_TAG}
docker tag radiot/stream-recorder:${GIT_TAG} radiot/stream-recorder:latest
docker push radiot/stream-recorder:latest
# - name: remote deployment from master
# if: ${{ github.ref == 'refs/heads/master' }}
# env:
# UPDATER_KEY: ${{ secrets.UPDATER_KEY }}
# run: curl https://radio-t.com/updater/update/stream-recorder/${UPDATER_KEY}