Skip to content

Bump golang.org/x/crypto from 0.14.0 to 0.17.0 #360

Bump golang.org/x/crypto from 0.14.0 to 0.17.0

Bump golang.org/x/crypto from 0.14.0 to 0.17.0 #360

Workflow file for this run

name: Build and publish container image
on:
# run when tagging or pushing to master
push:
branches: [master]
tags: ["*"]
# run on PRs against master
pull_request:
branches: [master]
# manual trigger
workflow_dispatch:
inputs:
tag:
description: Build a container image for this git tag
required: true
env:
# GitHub Container Registry hostname
GHCR_HOSTNAME: ghcr.io
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest SHA for this branch
uses: actions/checkout@v2
if: github.event_name != 'workflow_dispatch'
- name: Checkout the specified tag
uses: actions/checkout@v2
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ github.event.inputs.tag }}
- name: Get the latest Dockerfile if needed
if: github.event_name == 'workflow_dispatch'
run: |
if [[ ! -f Dockerfile ]]; then
git fetch --depth=1 origin master
git checkout origin/master -- Dockerfile
fi
- name: Build and cache first build stage
# update the first stage cache only when pushing to or tagging main
if: github.event_name == 'push'
uses: docker/build-push-action@v1
env:
# use BuildKit to speed up builds and improve caching
DOCKER_BUILDKIT: 1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
registry: ${{ env.GHCR_HOSTNAME }}
repository: ${{ github.repository }}
target: build
tags: build
build_args: BUILDKIT_INLINE_CACHE=1
cache_froms: ${{ env.GHCR_HOSTNAME }}/${{ github.repository }}:build
- name: Build the container image
uses: docker/build-push-action@v1
env:
# use BuildKit to speed up builds and improve caching
DOCKER_BUILDKIT: 1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
registry: ${{ env.GHCR_HOSTNAME }}
repository: ${{ github.repository }}
# auto create the tag if we're in a push/pull_request
tag_with_ref: ${{ github.event_name != 'workflow_dispatch' }}
# this will add the proper tag if we're in workflow_dispatch
tags: ${{ github.event.inputs.tag }}
build_args: BUILDKIT_INLINE_CACHE=1
cache_froms: >
${{ env.GHCR_HOSTNAME }}/${{ github.repository }}:build,
${{ env.GHCR_HOSTNAME }}/${{ github.repository }}:latest