chore(deps): bump publiccode-parser-go to v3.0.5 (#368) #327
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
name: ci | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# The build job will use the .git directory to | |
# infer the current version to embed in the binary | |
fetch-depth: 0 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.18' | |
- run: go build | |
- run: go test -race ./... | |
build_and_publish_docker_image: | |
needs: test | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' }} | |
steps: | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get Docker image tags | |
id: image_tags | |
run: | | |
IMAGE=italia/publiccode-crawler | |
TAGS=${IMAGE}:latest | |
TAGS="$TAGS,${IMAGE}:${GITHUB_SHA::8}" | |
echo ::set-output name=tags::${TAGS} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
build-args: | | |
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 | |
push: true | |
tags: ${{ steps.image_tags.outputs.tags }} |