Skip to content

Commit

Permalink
Reusable aur builder workflow (#25)
Browse files Browse the repository at this point in the history
* Create reusable-builder-aur.yml
  • Loading branch information
waybackarchiver authored Nov 12, 2022
1 parent 4a64b39 commit 2384e09
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/reusable-builder-aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright 2020 Wayback Archiver. All rights reserved.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.

name: AUR Package Builder

on:
workflow_call:
inputs:
product:
type: string
required: true
description: 'Product or package name'
params:
type: string
required: true
description: 'Building package parameters.'
artifact-path:
type: string
required: true
description: 'Path to stores artifacts.'
secrets:
wayback-ipfs-apikey:
description: 'Managed IPFS credential for distribution binaries.'

permissions:
contents: read

jobs:
aur-builder:
name: AUR Package Builder
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@2e205a28d0e1da00c5f53b161f4067b052c61f34 # v1.5.0
with:
egress-policy: block
disable-telemetry: true
allowed-endpoints: >
github.com:443
api.github.com:443
auth.docker.io:443
registry-1.docker.io:443
production.cloudflare.docker.com:443
storage.googleapis.com:443
proxy.golang.org:443
sum.golang.org:443
geo.mirror.pkgbuild.com:443
- name: Check out code base
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
fetch-depth: 0
submodules: true
persist-credentials: false

- name: Check out code base
if: github.event_name == 'pull_request'
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
fetch-depth: 0
submodules: true
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}

- name: Build AUR package
env:
WAYBACK_IPFS_APIKEY: ${{ secrets.wayback-ipfs-apikey }}
run: bash -c '${{ inputs.params }}'

- name: Upload artifacts
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: ${{ inputs.product }}-aur
path: ${{ inputs.artifact-path }}
if-no-files-found: error

0 comments on commit 2384e09

Please sign in to comment.