Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Bump golang.org/x/net from 0.0.0-20220722155237-a158d28d115b to 0.17.0 #666

Bump golang.org/x/net from 0.0.0-20220722155237-a158d28d115b to 0.17.0

Bump golang.org/x/net from 0.0.0-20220722155237-a158d28d115b to 0.17.0 #666

Workflow file for this run

name: Docker Image CI
# https://github.com/marketplace/actions/cosign-installer
on:
push:
branches:
- "**"
pull_request:
branches: [ master ]
release:
types: [created]
permissions:
pull-requests: write
issues: write
repository-projects: write
packages: write
env:
IMAGE_NAME: otc-rds-operator
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Cosign
uses: sigstore/cosign-installer@main
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
- name: Log in to registry
# This is where you will update the PAT to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push & Sign image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo "{{ github.ref.type }}"
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
cosign sign --key env://COSIGN_KEY $IMAGE_ID:$VERSION
env:
COSIGN_KEY: ${{secrets.COSIGN_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
- name: Push & Sign image release
if: github.ref.type == 'tag'
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=${GITHUB_REF_NAME}
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
cosign sign --key env://COSIGN_KEY $IMAGE_ID:$VERSION
env:
COSIGN_KEY: ${{secrets.COSIGN_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
- name: slack - GitHub Actions Slack integration
uses: act10ns/slack@v1.5.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
channel: '#dt-paas-alerts-test-2'
message: Deploying {{ env.GITHUB_REF_NAME }} branch