Skip to content

Update docker/build-push-action digest to 48aba3b #451

Update docker/build-push-action digest to 48aba3b

Update docker/build-push-action digest to 48aba3b #451

name: GitHub CR Build and Push
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [ master ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 1 * *'
env:
REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}
# github.repository as <account>/<repo>
jobs:
buildPush:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@0f069ddc17b8eb78586b08a7fe335fd54649e2d3
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Jenkins Docker metadata
id: meta
uses: docker/metadata-action@b53be03109c4ef6f6cc7aa545b84b17a7fe51c1e
with:
images: ${{ env.REGISTRY }}/${{ github.actor }}/jenkinsdsl
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and Push Jenkins image
id: build-and-push
uses: docker/build-push-action@0259cb088b9283926c6ffe4374b2a06a25c8c131
with:
context: .
file: docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Action to get the digest...
- name: GitOps Helm Chart Update(s)
uses: tpayne/github-actions/productmanifest@main
env:
API_TOKEN_GITHUB: ${{ secrets.XGITHUB_PAT }}
with:
gitops-repo-url: https://github.com/tpayne/codefresh-csdp-samples
manifest-file: helm/dev/values.yaml
github-username: ${{ secrets.XGITHUB_USER }}
github-email: ${{ secrets.XGITHUB_EMAIL }}
image-list: jenkinscd-framework-deployment:${{ env.REGISTRY }}/${{ github.actor }}/jenkinsdsl:master
git-token: ${{ secrets.XGITHUB_PAT }}
registry-server: ${{ env.REGISTRY }}
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.XGITHUB_PAT }}