Skip to content

Commit

Permalink
actions: automatic upstream rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcabrey authored and github-actions[bot] committed Jul 7, 2024
1 parent 6189172 commit 8d9ac7f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Rebase Upstream
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

jobs:
sync:
name: Rebase, build, and push image
runs-on: ubuntu-latest

env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10

- uses: imba-tjd/rebase-upstream-action@master
with:
upstream: poseidon/fleetlock
branch: main

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ github.sha }}
containerfiles: |
./Dockerfile
- name: Log in to the GitHub Container registry
if: github.event_name != 'pull_request'
id: login-to-ghcr
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GitHub Container Repository
if: github.event_name != 'pull_request'
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.REGISTRY }}

0 comments on commit 8d9ac7f

Please sign in to comment.