-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.06 KB
/
image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: image cosign workflow
on: push
jobs:
image_build_push_job:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: login-quay
uses: docker/login-action@v3
with:
registry: quay.io/rh-ee-asavage
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: install-cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v2.2.4'
- name: check-cosign-install
run: cosign version
- name: build-sign-push
run: |
echo "Test message build-sign-push"
cat > ./Dockerfile <<EOF
FROM alpine
CMD ["echo", "Hello container!"]
EOF
docker build -t quay.io/rh-ee-asavage/gha-image-test:latest .
docker push quay.io/rh-ee-asavage/gha-image-test:latest
cosign sign -y quay.io/rh-ee-asavage/gha-image-teslatest
echo "Success build-sign-push"