Skip to content

Merge pull request #29 from usma0118/renovate/alpine-3.x #28

Merge pull request #29 from usma0118/renovate/alpine-3.x

Merge pull request #29 from usma0118/renovate/alpine-3.x #28

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Encfs"
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches: ["main"]
paths: ["encfs/**"]
pull_request:
branches: ["main"]
paths: ["encfs/**"]
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/encfs
jobs:
build-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
attestations: write
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64,amd64,arm
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- if: ${{ github.event_name != 'pull_request' }}
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e1d5461f02b7886d3c1a774bfbd873650445aa2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=long
type=ref,event=tag
flavor: |
latest=auto
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:encfs"
sbom: true
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha
cache-to: type=gha,mode=max
- if: ${{ github.event_name != 'pull_request' }}
name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
id: attest
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.docker_build.outputs.digest }}
push-to-registry: ${{ github.event_name != 'pull_request' }}