-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: push Containerfile in release branch
- Loading branch information
1 parent
63444f7
commit e0e4b0c
Showing
1 changed file
with
32 additions
and
13 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 |
---|---|---|
|
@@ -16,13 +16,21 @@ env: | |
|
||
jobs: | ||
|
||
release: | ||
generate: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache APT packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: /var/cache/apt/archives | ||
key: ${{ runner.os }}-apt-${{ hashFiles('**/apt.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-apt- | ||
- name: Rootfs | ||
run: | | ||
sudo apt install -y debootstrap podman | ||
|
@@ -32,15 +40,26 @@ jobs: | |
- uses: vanilla-os/[email protected] | ||
|
||
- name: Commit Containerfile | ||
run: | | ||
mv Containerfile /tmp/Containerfile | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git clean -fxd | ||
git fetch | ||
git checkout release | ||
cp /tmp/Containerfile Containerfile | ||
git add Containerfile | ||
git commit -m "release: ${GITHUB_REF#refs/tags/}" | ||
git push | ||
- name: Save Containerfile | ||
id: save-containerfile | ||
run: echo "::set-output name=file_path::Containerfile" | ||
|
||
commit: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout release branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'release' | ||
|
||
- name: Commit Containerfile | ||
run: | | ||
file_path="${{ steps.save-containerfile.outputs.file_path }}" | ||
cp $file_path Containerfile | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add Containerfile | ||
git commit -m "release: ${GITHUB_REF#refs/tags/}" | ||
git push |