Skip to content

test: add more test cases #3

test: add more test cases

test: add more test cases #3

Workflow file for this run

name: Test and Release
on:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:
jobs:
test:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Hub Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
with:
context: https://github.com/docker/scout-demo-service.git
push: false
tags: scout:demo-service

Check failure on line 31 in .github/workflows/release-branch.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-branch.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
- name: [Test] quickview no image
uses: docker/scout-action@${{ github.head_ref }}
with:
command: quickview
- name: [ Test ] quickview
uses: docker/scout-action@${{ github.head_ref }}
with:
command: quickview
image: docker/scout-demo-service:main
- name: [ Test ] cves
uses: docker/scout-action@${{ github.head_ref }}
with:
command: cves
image: docker/scout-demo-service:main
- name: pull local image
run: |
docker pull docker/scout-demo-service:fix
- name: [ Test ] compare images
uses: docker/scout-action@${{ github.head_ref }}
with:
command: compare
image: registry://docker/scout-demo-service:main
to: local://docker/scout-demo-service:fix
exit-code: false
release:
if: startsWith(github.head_ref, 'release/v')
permissions:
contents: write
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Tag name
uses: mad9000/actions-find-and-replace-string@2
id: tagname
with:
source: ${{ github.head_ref }}
find: 'release/'
replace: ''
- name: Merge and Tag
run: |
git config --unset-all http.https://github.com/.extraheader
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git merge --ff-only origin/${{ github.head_ref }}
git tag ${{ steps.tagname.outputs.value }}
git push https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:main --tags