Skip to content

Added gosec

Added gosec #255

Workflow file for this run

name: ci
on:
push:
branches:
- '**'
tags:
- '!v**'
release:
types:
- published
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build a dev image
id: docker_build_dev
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.dev
push: false
load: true
tags: transformimgs-dev
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Gosec
id: gosec
uses: securego/gosec@master
with:
args: -exclude-dir illustration ./...
- name: Gosec illustration
id: gosecillustration
working-directory: ./illustration
uses: securego/gosec@master

Check failure on line 53 in .github/workflows/action.yml

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/action.yml (Line: 53, Col: 9): Unexpected value 'uses' .github/workflows/action.yml (Line: 54, Col: 9): Unexpected value 'with'
with:
args: ./...
- name: Run tests
run: |
docker run --entrypoint=/go/src/github.com/Pixboost/transformimgs/test.sh -v $(pwd):/go/src/github.com/Pixboost/transformimgs transformimgs-dev
- id: codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build a prod image
id: docker_build_prod
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
load: true
tags: transformimgs
build-args: |
"BRANCH=${{ github.ref_name }}"
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Run the service
run: |
docker run -p 8080:8080 -d transformimgs
sleep 5
- name: Smoketest
run: |
curl -o /dev/null -f http://localhost:8080/img/https://pixboost.com/img/homepage/hero.jpg/resize?size=x600
- name: Publish image
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
load: false
tags: pixboost/transformimgs:${{ github.event.release.tag_name }},pixboost/transformimgs:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache