chore: replace sync fork github action

This commit is contained in:
Steven Kreitzer 2023-11-30 10:37:23 -06:00
parent 197b14da1b
commit da79ae072c
No known key found for this signature in database
GPG key ID: 76F902141A05C232

View file

@ -67,20 +67,19 @@ jobs:
with: with:
repository: ${{ github.repository }} repository: ${{ github.repository }}
ref: talos ref: talos
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Pull upstream changes - name: Setup git
id: sync run: |
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 git config --global user.name "${{ github.actor }}"
with: git config --global user.email "${{ github.actor }}@users.noreply.github.com"
target_sync_branch: talos
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
target_branch_push_args: --force
upstream_sync_branch: refs/tags/${{ needs.check-releases.outputs.talosReleaseTag }}
upstream_sync_repo: siderolabs/talos
git_config_pull_rebase: true
outputs: - name: Sync upstream changes
has_new_commits: ${{ steps.sync.outputs.has_new_commits }} run: |
git remote add talos https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/siderolabs/talos
git pull talos refs/tags/${{ needs.check-releases.outputs.talosReleaseTag }} --rebase
git push --set-upstream origin talos --force
sync-pkgs-fork: sync-pkgs-fork:
needs: [ check-releases ] needs: [ check-releases ]
@ -93,26 +92,25 @@ jobs:
with: with:
repository: ${{ github.repository }} repository: ${{ github.repository }}
ref: pkgs ref: pkgs
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Get pkgs branch for talos release tag - name: Get pkgs release tag
id: get-pkgs-branch id: pkgs-release
run: | run: |
release=release-$(grep -Eo '[0-9]\.[0-9]+' <<< '${{ needs.check-releases.outputs.talosReleaseTag }}') release=release-$(grep -Eo '[0-9]\.[0-9]+' <<< '${{ needs.check-releases.outputs.talosReleaseTag }}')
echo "release=$release" >> $GITHUB_OUTPUT echo "release=$release" >> $GITHUB_OUTPUT
- name: Pull upstream changes - name: Setup git
id: sync run: |
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 git config --global user.name "${{ github.actor }}"
with: git config --global user.email "${{ github.actor }}@users.noreply.github.com"
target_sync_branch: pkgs
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
target_branch_push_args: --force
upstream_sync_branch: ${{ steps.get-pkgs-branch.outputs.release }}
upstream_sync_repo: siderolabs/pkgs
git_config_pull_rebase: true
outputs: - name: Sync upstream changes
has_new_commits: ${{ steps.sync.outputs.has_new_commits }} run: |
git remote add pkgs https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/siderolabs/pkgs
git pull pkgs ${{ steps.pkgs-release.outputs.release }} --rebase
git push --set-upstream origin pkgs --force
build-kernel: build-kernel:
needs: [ check-releases, sync-pkgs-fork ] needs: [ check-releases, sync-pkgs-fork ]
@ -224,7 +222,7 @@ jobs:
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: talos-installer name: talos-installer
path: /out/installer-amd64.tar path: /out/metal-amd64-installer.tar
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1
@ -278,5 +276,5 @@ jobs:
run: | run: |
crane push \ crane push \
--platform linux/amd64 \ --platform linux/amd64 \
/tmp/talos-build-assets/installer-amd64.tar \ /tmp/talos-build-assets/metal-amd64-installer.tar \
ghcr.io/${{ github.actor }}/installer:${{ needs.check-releases.outputs.talosReleaseTag }} ghcr.io/${{ github.actor }}/installer:${{ needs.check-releases.outputs.talosReleaseTag }}