v0.8.9-beta #6
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: ghcr | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Push uhppoted-rest container to ghcr.io | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.23 | |
cache: false | |
- name: Install staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Install govulncheck | |
run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: | | |
make docker-ghcr | |
docker images | |
- name: Docker login to ghcr.io | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
- name: Push Docker 'latest' image to ghcr.io | |
run: | | |
docker push ghcr.io/uhppoted/restd:latest | |
- name: Push versioned Docker image to ghcr.io | |
if: github.event_name == 'release' && github.event.action == 'published' | |
run: | | |
echo ">>>>>> build Docker image version ${{ github.event.release.tag_name }}" | |
make docker-ghcr DOCKER=ghcr.io/uhppoted/restd:0.8.8 | |
docker images | |
docker push ghcr.io/uhppoted/restd:0.8.8 |