-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish 24.04 images to GitHub Container Registry
Ref #1
- Loading branch information
Showing
2 changed files
with
40 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,36 @@ | ||
name: Build container images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '20 3 * * 0' # Basically picked at random to try and be a low-load time for GitHub Actions | ||
workflow_dispatch: | ||
|
||
jobs: | ||
login: | ||
name: Log in to GitHub Container Registry | ||
runs-on: ubuntu-latest | ||
env: | ||
REGISTRY_USER: ${{ github.actor }} | ||
REGISTRY_PASSWORD: ${{ github.token }} | ||
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | ||
steps: | ||
- name: Log in to ghcr.io | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
build_push_images: | ||
name: Build and push container images | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build and push container images | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
run: ./build-and-push.sh 24.04 |
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,4 @@ | ||
#!/bin/sh | ||
|
||
./build.sh $1 | ||
podman push ubuntu-server-dev:$1 $(podman images --format='{{.Repository}}:{{.Tag}}' | grep localhost/ubuntu-server-dev | tr '\n' ' ' | sed 's;localhost/;ghcr.io/seagl/ubuntu-server-dev/;g') |