Skip to content

Create CNAME

Create CNAME #23

Workflow file for this run

name: Deploy Repository
on:
push:
branches: [main]
workflow_call:
inputs:
package_url:
required: true
type: string
package_name:
required: true
type: string
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download package
if: inputs.package_url != ''
run: |
curl -L "${{ inputs.package_url }}" -o "docs/debs/${{ inputs.package_name }}"
- name: Update package version
if: inputs.package_url != ''
run: |
dpkg-deb -f "docs/debs/${{ inputs.package_name }}" > control.tmp
VERSION=$(grep "Version:" control.tmp | cut -d' ' -f2)
PACKAGE_ID=$(grep "Package:" control.tmp | cut -d' ' -f2)
if [ -f "docs/depictions/web/$PACKAGE_ID/info.xml" ]; then
sed -i "s|<version>.*</version>|<version>$VERSION</version>|" "docs/depictions/web/$PACKAGE_ID/info.xml"
else
echo "Warning: Depiction file not found for package $PACKAGE_ID"
fi
rm control.tmp
- name: Import GPG key
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
run: |
echo "$GPG_KEY" | gpg --import
KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | cut -d'/' -f2 | cut -d' ' -f1)
echo "GPG_KEY_ID=$KEY_ID" >> $GITHUB_ENV
- name: Update Repository
env:
GPG_KEY_ID: ${{ env.GPG_KEY_ID }}
run: |
chmod +x update-repo.sh
./update-repo.sh
- name: Commit & Push changes
uses: EndBug/add-and-commit@v9
with:
add: "."
default_author: github_actions
message: "chore(repo): update packages [skip ci]"
push: true