-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package what this repo does in GH Action + add tests for it
- Loading branch information
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Central Dockerfile for GitHub Action invoking `az-repo-apt-add` | ||
|
||
# Use Ubuntu 24.04 as base image - it's simpler to start off Debian-based OS, | ||
# given that we'll be using `dpkg-scanpackages` | ||
FROM ubuntu:24.04 | ||
|
||
# Install Ubuntu native prerequisites | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
dpkg-dev \ | ||
ca-certificates \ | ||
curl \ | ||
apt-transport-https \ | ||
lsb-release \ | ||
gnupg | ||
|
||
# Install Azure CLI | ||
RUN \ | ||
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null && \ | ||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/azure-cli.list && \ | ||
apt-get update && \ | ||
apt-get install azure-cli | ||
|
||
COPY \ | ||
az-repo-apt-add \ | ||
repo-apt-handle \ | ||
common.sh \ | ||
./ | ||
|
||
# Ensures that Action maps all the paths in invoking workspace, e.g. | ||
# paths to .deb files to publish | ||
WORKDIR /github/workspace | ||
|
||
ENTRYPOINT ["/az-repo-apt-add"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish .deb package | ||
description: Add .deb package to apt repository hosted on Azure Blob Storage | ||
inputs: | ||
az_storage_sas_token: | ||
description: Azure Storage SAS token | ||
required: true | ||
az_storage_account: | ||
description: Azure Storage account name | ||
required: true | ||
az_storage_container: | ||
description: Azure Storage container name | ||
required: true | ||
packages: | ||
description: List of paths to .deb packages to publish | ||
required: true | ||
runs: | ||
using: docker | ||
image: Dockerfile | ||
env: | ||
AZURE_STORAGE_SAS_TOKEN: ${{ inputs.az_storage_sas_token }} | ||
AZ_STORAGE_ACCOUNT: ${{ inputs.az_storage_account }} | ||
AZ_STORAGE_CONTAINER: ${{ inputs.az_storage_container }} | ||
PKGS_SRC: ${{ inputs.packages }} |