-
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.
- Loading branch information
0 parents
commit 5cd6b5e
Showing
3 changed files
with
67 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Build and deploy images | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build-hd-idle: | ||
uses: ./.github/workflows/build-image.yaml | ||
with: | ||
imageName: hd-idle | ||
|
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,49 @@ | ||
# | ||
name: Create and publish a Docker image | ||
|
||
# Configures this workflow to run every time a change is pushed to the branch called `release`. | ||
on: | ||
workflow_call: | ||
inputs: | ||
imageName: | ||
type: string | ||
required: true | ||
|
||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
# | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Image | ||
id: build-image | ||
uses: redhat-actions/[email protected] | ||
with: | ||
image: ${{ inputs.imageName }} | ||
tags: latest ${{ github.sha }} | ||
containerfiles: | | ||
./images/${{ inputs.imageName }}/Containerfile | ||
# Podman Login action (https://github.com/redhat-actions/podman-login) also be used to log in, | ||
# in which case 'username' and 'password' can be omitted. | ||
- name: Push To github repo | ||
id: push-to-github | ||
uses: redhat-actions/[email protected] | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} |
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,7 @@ | ||
FROM ubuntu:latest | ||
|
||
|
||
RUN curl -L -O https://github.com/adelolmo/hd-idle/releases/download/v1.21/hd-idle_1.21_amd64.deb | ||
RUN apt update && dpkg --install hd-idle_1.21_amd64.deb && rm hd-idle_1.21_amd64.deb | ||
|
||
ENTRYPOINT [ "hd-idle" ] |