Bump golang.org/x/crypto from 0.29.0 to 0.30.0 #347
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: build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v** | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Determine Version | |
run: | | |
# determine version from tag | |
export VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3) | |
if [[ $VERSION != v* ]] | |
then | |
export VERSION="" | |
echo "Building version-less (main or feature branch)" | |
else | |
# make version more Docker-friendly by dropping the 'v' | |
export VERSION=${VERSION:1:${#VERSION}} | |
echo "Building as ${VERSION}" | |
fi | |
echo "##[set-output name=version;]$VERSION" | |
id: determine_version | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Lint | |
run: go vet ./... | |
- name: Build | |
run: go build ./... | |
- name: Test | |
run: go test -v -coverprofile=coverage.cov -coverpkg ./... -covermode=atomic ./... | |
- uses: codecov/[email protected] | |
with: | |
files: coverage.cov | |
flags: unittests | |
- name: Push Release Docker Image | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
docker build -t ghcr.io/oxisto/oauth2go:latest . | |
docker tag ghcr.io/oxisto/oauth2go:latest ghcr.io/oxisto/oauth2go:$VERSION | |
docker push ghcr.io/oxisto/oauth2go:$VERSION | |
docker push ghcr.io/oxisto/oauth2go:latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
VERSION: ${{ steps.determine_version.outputs.version }} |