chore(deps): update dependency oauth2-proxy/oauth2-proxy to v7.7.0 #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Container image name consists of QUAY_USERNAME and workflow name. | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
container: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: jitterbit/get-changed-files@v1 | |
id: files | |
with: | |
format: space-delimited | |
token: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: Prepare | |
id: prep | |
run: | | |
CONTEXT=$(basename "${GITHUB_WORKFLOW}" .yml) | |
CONTAINER_IMAGE=quay.io/${{ secrets.QUAY_USERNAME }}/${CONTEXT} | |
SHORTREF=${GITHUB_SHA::8} | |
if [ -f "${CONTEXT}/VERSION" ]; then | |
VERSION=$(cat "${CONTEXT}/VERSION" | xargs) | |
TAGS="${CONTAINER_IMAGE}:latest,${CONTAINER_IMAGE}:${SHORTREF},${CONTAINER_IMAGE}:${VERSION}" | |
else | |
TAGS="${CONTAINER_IMAGE}:latest,${CONTAINER_IMAGE}:${SHORTREF}" | |
fi | |
MODIFIED="false" | |
for file in ${{ steps.files.outputs.all }}; do | |
if [[ "$file" =~ ^${CONTEXT}/ ]]; then | |
MODIFIED="true" | |
break | |
fi | |
done | |
# Set output parameters. | |
echo ::set-output name=tags::${TAGS} | |
echo ::set-output name=docker_image::${CONTAINER_IMAGE} | |
echo ::set-output name=file_context::${CONTEXT} | |
echo ::set-output name=modified::${MODIFIED} | |
- name: Set up QEMU | |
if: steps.prep.outputs.modified == 'true' | |
uses: docker/setup-qemu-action@master | |
with: | |
platforms: amd64,arm64,arm | |
- name: Set up Docker Buildx | |
if: steps.prep.outputs.modified == 'true' | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Login to registry | |
if: github.event_name != 'pull_request' && steps.prep.outputs.modified == 'true' | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build | |
if: steps.prep.outputs.modified == 'true' | |
uses: docker/build-push-action@v3 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: ${{ steps.prep.outputs.file_context }} | |
file: ${{ steps.prep.outputs.file_context }}/Dockerfile | |
platforms: linux/amd64,linux/arm64,linux/arm | |
push: true | |
tags: ${{ steps.prep.outputs.tags }} |