Skip to content

Commit

Permalink
Publish distrobox image (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngarside authored Nov 9, 2023
1 parent 79710db commit 5649988
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/distrobox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is free and unencumbered software released into the public domain.

name: distrobox

on:
push:
branches:
- master
schedule:
- cron: 0 0 * * 0
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
steps:

- name: checkout
uses: actions/checkout@v3

- name: login
run: podman login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}

- name: build
run: podman build --file distrobox/containerfile --tag ghcr.io/ngarside/distrobox:latest distrobox

- name: push
run: podman push ghcr.io/ngarside/distrobox:latest
40 changes: 40 additions & 0 deletions distrobox/containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is free and unencumbered software released into the public domain.

FROM registry.opensuse.org/opensuse/distrobox:latest

# Import RPM keys
RUN rpm --import https://rpm.releases.hashicorp.com/gpg
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc

# Configure RPM repos
COPY hashicorp.repo /etc/zypp/repos.d/repo-hashicorp.repo
COPY microsoft.repo /etc/zypp/repos.d/repo-microsoft.repo

# Install packages
RUN zypper --non-interactive install --no-recommends \
ansible \
azure-cli \
dotnet-sdk-7.0 \
git \
hadolint \
ImageMagick \
just \
jq \
libgthread-2_0-0 \
libXtst6 \
npm \
python3-rpm \
python3-yamllint \
ShellCheck \
terraform \
&& zypper clean

# Install Azure Artifacts credential provider
RUN mkdir /opt/nuget \
&& wget -O- \
https://github.com/microsoft/artifacts-credprovider/releases/latest/download/Microsoft.Net6.NuGet.CredentialProvider.tar.gz \
| tar --extract --gzip --directory /opt/nuget

# Set default environment variables
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
ENV NUGET_PLUGIN_PATHS /opt/nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll
8 changes: 8 additions & 0 deletions distrobox/hashicorp.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is free and unencumbered software released into the public domain.

[repo-hashicorp]
baseurl = https://rpm.releases.hashicorp.com/fedora/38/$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://rpm.releases.hashicorp.com/gpg
name = repo-hashicorp
8 changes: 8 additions & 0 deletions distrobox/microsoft.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is free and unencumbered software released into the public domain.

[repo-microsoft]
baseurl = https://packages.microsoft.com/opensuse/15/prod
enabled = 1
gpgcheck = 1
gpgkey = https://packages.microsoft.com/keys/microsoft.asc
name = repo-microsoft

0 comments on commit 5649988

Please sign in to comment.