Skip to content

Commit

Permalink
#2 : CLean up approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Hynes committed Jan 30, 2023
1 parent 93d7b02 commit 9430bef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 54 deletions.
55 changes: 16 additions & 39 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ name: Docker

on:
schedule:
- cron: '42 13 * * *'
- cron: '00 02 * * *'
push:
branches: [ "7.2.2" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]

env:
# Use docker.io for Docker Hub if empty
Expand All @@ -37,24 +35,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set Python Version
uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: python extract-vars.py

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
with:
cosign-release: 'v1.11.0'


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
# # Install the cosign tool except on PR
# # https://github.com/sigstore/cosign-installer
# - name: Install cosign
# if: github.event_name != 'pull_request'
# uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
# with:
# cosign-release: 'v1.11.0'
#
# # Workaround: https://github.com/docker/build-push-action/issues/461
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
Expand Down Expand Up @@ -83,25 +74,11 @@ jobs:
context: .
build-args: |
CONFLUENT_URL=http://packages.confluent.io/archive
CONFLUENT_MAJOR_VERSION=$CONFLUENT_MAJOR_VERSION
CONFLUENT_MINOR_VERSION=$CONFLUENT_MINOR_VERSION
CONFLUENT_MAJOR_VERSION=7.2
CONFLUENT_MINOR_VERSION=7.2.2
INSTALL_DIR=/tmp
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
tags: 7.2.2
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max


# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
# - name: Sign the published Docker image
# if: ${{ github.event_name != 'pull_request' }}
# env:
# COSIGN_EXPERIMENTAL: "true"
# # This step uses the identity token to provision an ephemeral certificate
# # against the sigstore community Fulcio instance.
# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
cache-to: type=gha,mode=max
15 changes: 0 additions & 15 deletions extract-vars.py

This file was deleted.

0 comments on commit 9430bef

Please sign in to comment.