Skip to content

default cosign to v2.0.1 #273

default cosign to v2.0.1

default cosign to v2.0.1 #273

Workflow file for this run

name: test-cosign
on:
pull_request:
push:
branches:
- 'main'
jobs:
test_cosign_action:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
permissions: {}
name: Install Cosign and test presence in path
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: ./
- name: Check install!
run: cosign version
- name: Check root directory
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'should be clean'
exit 1
else
exit 0
fi
shell: bash
test_existing_release_action:
# this does not run on macOS as the support for multi-arch was not added yet
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
permissions: {}
name: Install existing release of Cosign and test presence in path
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v2.8.1
- name: Check install!
run: cosign version
- name: Check root directory
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'should be clean'
exit 1
else
exit 0
fi
test_cosign_action_custom:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
permissions: {}
name: Install Custom Cosign and test presence in path
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: ./
with:
cosign-release: 'v2.0.0'
- name: Check install!
run: cosign version
- name: Check root directory
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'should be clean'
exit 1
else
exit 0
fi
shell: bash
test_cosign_action_0_6_0:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
permissions: {}
name: Install Cosign v0.6.0 and test presence in path
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: ./
with:
cosign-release: 'v0.6.0'
- name: Check install!
run: cosign version
- name: Check root directory
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'should be clean'
exit 1
else
exit 0
fi
shell: bash
test_cosign_action_0_6_0_with_pre_installed_libpcsclite1_package:
# this test is specifically for linux and pcsclite1 dependencies
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
permissions: {}
name: Install Cosign v0.6.0 and test presence in path with pre installed libpcsclite1 package
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install libpcsclite1
run: |
sudo apt-get update -q
sudo apt-get install -yq libpcsclite1
- name: Install Cosign
uses: ./
with:
cosign-release: 'v0.6.0'
- name: Check install!
run: cosign version
- name: Check root directory
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'should be clean'
exit 1
else
exit 0
fi
test_cosign_action_wrong:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
permissions: {}
name: Try to install a wrong Cosign
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: ./
with:
cosign-release: 'honk'
continue-on-error: true
test_cosign_action_custom_dir:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
permissions: {}
name: Install Custom Cosign and test presence in path
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: ./
with:
install-dir: "$HOME/.cosigntest"
- name: Check install!
run: cosign version
- name: Check install dir!
run: |
[[ $(dirname "$(which cosign)") == "$HOME/.cosigntest" ]]
shell: bash
- name: Check root directory
run: |
[[ -z $(git diff --stat) ]]
shell: bash
test_cosign_action_custom_dir_root:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
permissions: {}
name: Install Custom Cosign and test presence in path with custom root dir
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install Cosign
uses: ./
with:
install-dir: /usr/bin
use-sudo: true
- name: Check install!
run: cosign version
- name: Check install dir!
run: |
[[ $(dirname "$(which cosign)") == /usr/bin ]]
shell: bash
- name: Check root directory
run: |
[[ -z $(git diff --stat) ]]
shell: bash
test_cosign_with_go_install:
permissions: {}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
go_version:
- '1.19'
- '1.20'
name: Try to install cosign with go ${{ matrix.go_version }}
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ matrix.go_version }}
check-latest: true
- name: Install Cosign
uses: ./
with:
cosign-release: 'main'
- name: Check install!
run: cosign version