Skip to content

Commit

Permalink
Fix GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
strugee committed Oct 1, 2024
1 parent 0ec9610 commit e50b88e
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,29 @@ on:
branches:
- main
schedule:
- cron: '20 3 * * 0' # Basically picked at random to try and be a low-load time for GitHub Actions
# Basically picked at random to try and be a low-load time for GitHub Actions
- cron: '20 3 * * 0'
workflow_dispatch:

jobs:
login:
name: Log in to GitHub Container Registry
build_push_images:
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
- name: Log in to GitHub Container Registry
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:
username: ${{ github.actor }}
password: ${{ github.token }}
# TODO use {{ github.repository_owner }} when https://github.com/redhat-actions/podman-login/issues/44 is fixed
registry: ghcr.io/seagl

- name: Checkout Repo
uses: actions/checkout@v1
- 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
- name: Build and push container images
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: ./build-and-push.sh 24.04

0 comments on commit e50b88e

Please sign in to comment.