Skip to content

Commit 2cbb58b

Browse files
craigcabreygithub-actions[bot]
authored andcommitted
actions: automatic upstream rebase
1 parent a01fe7f commit 2cbb58b

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/sync.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Rebase Upstream
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
workflow_dispatch:
6+
7+
jobs:
8+
sync:
9+
name: Rebase, build, and push image
10+
runs-on: ubuntu-latest
11+
12+
env:
13+
IMAGE_NAME: ${{ github.repository }}
14+
REGISTRY: ghcr.io
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 10
20+
21+
- uses: imba-tjd/rebase-upstream-action@master
22+
with:
23+
upstream: poseidon/fleetlock
24+
branch: main
25+
26+
- name: Build Image
27+
id: build-image
28+
uses: redhat-actions/buildah-build@v2
29+
with:
30+
image: ${{ env.IMAGE_NAME }}
31+
tags: latest ${{ github.sha }}
32+
containerfiles: |
33+
./Dockerfile
34+
35+
- name: Log in to the GitHub Container registry
36+
if: github.event_name != 'pull_request'
37+
id: login-to-ghcr
38+
uses: redhat-actions/podman-login@v1
39+
with:
40+
registry: ${{ env.REGISTRY }}
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Push to GitHub Container Repository
45+
if: github.event_name != 'pull_request'
46+
id: push-to-ghcr
47+
uses: redhat-actions/push-to-registry@v2
48+
with:
49+
image: ${{ steps.build-image.outputs.image }}
50+
tags: ${{ steps.build-image.outputs.tags }}
51+
registry: ${{ env.REGISTRY }}

0 commit comments

Comments
 (0)