Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust workflows to new branch structure #199

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
with:
fetch-depth: 0

- name: Change tag in recipe.
run: |
sed 's/ghcr.io\/vanilla-os\/core:dev/ghcr.io\/vanilla-os\/core:main/' -i recipe.yml

- uses: vanilla-os/[email protected]
with:
recipe: 'recipe.yml'
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/sync-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sync Main Branch

on:
workflow_dispatch:

jobs:
check_base_status:
runs-on: ubuntu-latest
steps:
- name: Clone base image.
uses: actions/checkout@v4
with:
repository: Vanilla-OS/core-image
kbdharun marked this conversation as resolved.
Show resolved Hide resolved

- name: Check if base is up to date.
run: |
git fetch origin
main_head=$( git rev-parse origin/main )
dev_head=$( git rev-parse origin/dev )
echo main branch is at: $main_head
echo dev branch is at: $dev_head
[ "$main_head" = "$dev_head" ]

sync:
runs-on: ubuntu-latest
needs: check_base_status

steps:
- uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0

- name: Push dev to main.
run: |
git push origin dev:main
8 changes: 6 additions & 2 deletions .github/workflows/vib-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- 'dev'
tags:
- '*'
workflow_dispatch:
pull_request:

Expand All @@ -18,6 +16,7 @@ jobs:

steps:
- name: Verify Base Image Integrity
if: ${{ github.ref == 'refs/heads/main' }}
run:
gh attestation verify oci://ghcr.io/vanilla-os/core:main --owner Vanilla-OS
env:
Expand All @@ -35,6 +34,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Change tag in recipe.
if: ${{ github.ref == 'refs/heads/main' }}
run: |
sed 's/ghcr.io\/vanilla-os\/core:dev/ghcr.io\/vanilla-os\/core:main/' -i recipe.yml

- uses: vanilla-os/[email protected]
with:
recipe: 'recipe.yml'
Expand Down
Loading