Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
feat: allo passing branch
Browse files Browse the repository at this point in the history
  • Loading branch information
boredland committed Jan 24, 2023
1 parent 6eefb40 commit 3e257f4
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ inputs:
dispatch-token:
description: token required for dispatch to Manjaro-Sway/packages
required: true
before_publish:
description: script to be run just before publishing the artifact
branch:
description: manjaro branch to publish against
required: false
default: echo empty
default: unstable

outputs:
filename:
Expand All @@ -43,7 +43,7 @@ runs:
run: |
echo "archs=$(cat ${{ inputs.pkgbuild }} | grep ^arch= | sed -e 's/^arch=(\(.*\))/\1/')" >>$GITHUB_OUTPUT
VERSION=$(cat ${{ inputs.pkgbuild }} | grep ^pkgver= | sed -e 's/^pkgver=//' | awk '{print $1}')-$(cat ${{ inputs.pkgbuild }} | grep ^pkgrel= | sed -e 's/^pkgrel=//' | awk '{print $1}')
echo "version=${VERSION}" >>$GITHUB_OUTPUT
echo "version=${{ inputs.branch }}-${VERSION}" >>$GITHUB_OUTPUT
- name: x86_64-build
shell: bash
if: ${{ ( contains(steps.info.outputs.archs, 'any') && inputs.archlinux_arch == 'x86_64' ) }}
Expand Down Expand Up @@ -86,7 +86,7 @@ runs:
pacman-key --keyserver keys.openpgp.org --recv-keys ${{ inputs.gpg_keyid }}
sed -i '/^\[core\]/i \[manjaro-sway\]\nSigLevel = Optional TrustAll\nServer = https://packages.manjaro-sway.download/$arch\n' /etc/pacman.conf
pacman-mirrors --geoip
pacman-mirrors --api --set-branch "${{ inputs.branch }}"
sudo pacman -Sy --noconfirm --needed base-devel github-cli
run: |
pacman -Syy
Expand All @@ -100,10 +100,6 @@ runs:
chown builder $PWD
sudo -u builder makepkg -fsAc --noconfirm --noprogressbar -p ${{ inputs.pkgbuild }}
cp *.pkg.tar.zst* /artifacts/
- id: before_publish
shell: bash
if: ${{ env.BUILD == 'true' }}
run: ${{ inputs.before_publish }}
- name: sign
shell: bash
if: ${{ env.BUILD == 'true' }}
Expand All @@ -129,4 +125,4 @@ runs:
token: ${{ inputs.dispatch-token }}
repository: manjaro-sway/packages
event-type: package_update
client-payload: '{ "repository": "${{ github.repository }}", "version": "${{ steps.info.outputs.version }}" }'
client-payload: '{ "repository": "${{ github.repository }}", "version": "${{ steps.info.outputs.version }}", "branch": "${{ inputs.branch }}" }'

0 comments on commit 3e257f4

Please sign in to comment.