Compare commits

..

53 Commits

Author SHA1 Message Date
Husen e58b416119 Merge pull request #43 from heyhusen/release/v2.2.1
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
chore: release v2.2.1
2024-02-19 00:12:16 +07:00
Husen 3f13112064 chore: release v2.2.1
Signed-off-by: Husen <hi@husen.id>
2024-02-19 00:10:06 +07:00
dependabot[bot] 8a82ee672c Merge pull request #39 from heyhusen/dependabot/github_actions/tj-actions/branch-names-8 2024-02-18 16:54:56 +00:00
dependabot[bot] 20d8479ebc chore(deps): bump tj-actions/branch-names from 7 to 8
Bumps [tj-actions/branch-names](https://github.com/tj-actions/branch-names) from 7 to 8.
- [Release notes](https://github.com/tj-actions/branch-names/releases)
- [Changelog](https://github.com/tj-actions/branch-names/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/branch-names/compare/v7...v8)

---
updated-dependencies:
- dependency-name: tj-actions/branch-names
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-18 16:52:52 +00:00
Husen 9fd24ca405 Merge pull request #42 from heyhusen/bugfix/cannot-pull-docker-image
fix: can't pull docker image
2024-02-18 23:47:58 +07:00
Husen f7376aba0b fix: can't pull docker image
Signed-off-by: Husen <hi@husen.id>
2024-02-18 23:45:23 +07:00
dependabot[bot] 5e383b10b5 Merge pull request #38 from hapakaien/dependabot/github_actions/docker/metadata-action-5 2023-09-17 13:50:30 +00:00
dependabot[bot] 8f5e879913 chore(deps): bump docker/metadata-action from 4 to 5
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 20:57:44 +00:00
dependabot[bot] 47fa19da38 Merge pull request #37 from hapakaien/dependabot/github_actions/actions/checkout-4 2023-09-10 09:38:16 +00:00
dependabot[bot] fd1dbe5048 chore(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 20:08:50 +00:00
dependabot[bot] c058d80ac5 Merge pull request #36 from hapakaien/dependabot/github_actions/tj-actions/branch-names-7 2023-05-18 06:53:24 +00:00
dependabot[bot] aa9be96cf9 chore(deps): bump tj-actions/branch-names from 6 to 7
Bumps [tj-actions/branch-names](https://github.com/tj-actions/branch-names) from 6 to 7.
- [Release notes](https://github.com/tj-actions/branch-names/releases)
- [Changelog](https://github.com/tj-actions/branch-names/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/branch-names/compare/v6...v7)

---
updated-dependencies:
- dependency-name: tj-actions/branch-names
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 21:01:12 +00:00
dependabot[bot] bc32e723f3 Merge pull request #30 from hapakaien/dependabot/github_actions/tj-actions/branch-names-6 2022-12-04 14:49:34 +00:00
dependabot[bot] f699bb5cff chore(deps): bump tj-actions/branch-names from 5 to 6
Bumps [tj-actions/branch-names](https://github.com/tj-actions/branch-names) from 5 to 6.
- [Release notes](https://github.com/tj-actions/branch-names/releases)
- [Changelog](https://github.com/tj-actions/branch-names/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/branch-names/compare/v5...v6)

---
updated-dependencies:
- dependency-name: tj-actions/branch-names
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 21:45:28 +00:00
Ahmad Husen 0f306e414a Merge pull request #29 from hapakaien/release/v2.2.0
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
chore: release v2.2.0
2022-08-05 13:25:21 +07:00
Ahmad Husen f9ff68181b chore: release v2.2.0 2022-08-05 13:23:23 +07:00
Ahmad Husen 94f928c5df Merge pull request #28 from LizardByte/repository-name-lowercase
Convert repository name to lowercase
2022-08-05 10:51:18 +07:00
Ahmad Husen 099605a64c Merge pull request #27 from LizardByte/fix/keyring
add option to update archlinux-keyring
2022-08-05 10:07:29 +07:00
ReenigneArcher d3aea41d02 allow variable expansion in sed command
Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2022-07-29 17:44:57 -04:00
ReenigneArcher 618a0ba862 make repository name lowercase
Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2022-07-29 17:44:57 -04:00
ReenigneArcher c9118ad67a add option to update archlinux-keyring 2022-07-29 17:27:57 -04:00
Ahmad Husen 2d9dafa60e Merge pull request #22 from hapakaien/release/v2.1.1
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
chore: release v2.1.1
2022-05-15 14:04:52 +07:00
Ahmad Husen ae967066cb chore: release v2.1.1 2022-05-15 14:03:00 +07:00
Ahmad Husen cf8509924b Merge pull request #21 from hapakaien/bugfix/conditional-bash-script
fix: wrong conditional using paru
2022-05-15 13:54:13 +07:00
Ahmad Husen 1a92d6efa7 fix: wrong conditional using paru 2022-05-15 13:51:00 +07:00
dependabot[bot] 8dc2e4d3e8 Merge pull request #20 from hapakaien/dependabot/github_actions/docker/metadata-action-4 2022-05-06 02:38:57 +00:00
dependabot[bot] 37bda140be chore(deps): bump docker/metadata-action from 3 to 4
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-05 20:27:31 +00:00
Ahmad Husen f710e16a35 Merge pull request #19 from hapakaien/release/v2.1.0
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
chore: release v2.1.0
2022-05-05 23:08:55 +07:00
Ahmad Husen 7118f1dd24 chore: release v2.1.0 2022-05-05 23:07:01 +07:00
Ahmad Husen fda333bd87 Merge pull request #18 from kamack38/aur-deps
feat: 🎸 Add option to resolve deps using paru (from AUR)
2022-05-04 19:52:40 +07:00
kamack38 80d76aa524 style: 💄 Fix trailing space in README 2022-04-27 14:12:16 +02:00
kamack38 77f37ad6f1 docs: ✏️ Update docs 2022-04-27 14:10:39 +02:00
kamack38 c3e3ab0325 feat: 🎸 Add option to resolve deps using paru (from AUR) 2022-04-27 14:06:06 +02:00
dependabot[bot] b257397a15 Merge pull request #17 from hapakaien/dependabot/github_actions/actions/checkout-3 2022-03-02 11:24:41 +00:00
dependabot[bot] a4f0a491d0 chore(deps): bump actions/checkout from 2.4.0 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 20:28:36 +00:00
Ahmad Husen eadb0293c0 Merge pull request #16 from hapakaien/release/v2.0.3
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
chore: release v2.0.3
2022-02-02 15:15:02 +07:00
Ahmad Husen 9400d7c75d chore: release v2.0.3 2022-02-02 15:13:33 +07:00
Ahmad Husen c121cf29d7 Merge pull request #15 from hapakaien/bugfix/pkgbuild-permission
fix: wrong copied PKGBUILD permission
2022-02-02 15:09:47 +07:00
Ahmad Husen 265fe9f569 fix: wrong copied PKGBUILD permission 2022-02-02 15:08:12 +07:00
Ahmad Husen 66d669bebf Merge pull request #14 from hapakaien/v2
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
CI / Test (with Dockerfile) (push) Has been cancelled
chore: release v2.0.2
2022-02-02 12:06:30 +07:00
Ahmad Husen e346bea956 chore: release v2.0.2 2022-02-02 11:43:57 +07:00
Ahmad Husen 6ade55c2b2 Merge pull request #13 from hapakaien/v2
chore: release v2.0.1
2022-02-02 11:36:26 +07:00
Ahmad Husen 8455f15e27 chore: release v2.0.1 2022-02-02 11:34:30 +07:00
Ahmad Husen 594be7f44a Merge pull request #12 from hapakaien/hotfix/wrong-oci-tag
CI / Publish OCI image (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Release (push) Has been cancelled
fix: wrong oci image tag on action.yml
2022-02-02 11:33:13 +07:00
Ahmad Husen 0a161adbcd fix: wrong oci image tag on action.yml 2022-02-02 11:31:39 +07:00
Ahmad Husen 94c0a400c6 Merge pull request #11 from hapakaien/v2
chore: release v2.0.0
2022-02-02 11:21:48 +07:00
Ahmad Husen cd2e2d62b6 chore: release v2.0.0
CI / Publish OCI image (push) Has been cancelled
CI / Test (with Dockerfile) (push) Has been cancelled
CI / Test (with prebuilt OCI Image) (push) Has been cancelled
CI / Release (push) Has been cancelled
2022-02-02 11:19:55 +07:00
Ahmad Husen 4da3a1b0cc Merge pull request #10 from hapakaien/feature/migrate-to-buildah
feature: replace Docker with Buildah in CI
2022-02-02 11:08:06 +07:00
Ahmad Husen 7926f4fb39 feature: replace Docker with Buildah in CI 2022-02-02 11:03:05 +07:00
Ahmad Husen 863b0d9617 Merge pull request #9 from hapakaien/bugfix/sudoers-user
fix: add user directly into sudoers file
2022-02-02 10:39:52 +07:00
Ahmad Husen 360be955b0 fix: add user directly into sudoers file 2022-02-02 10:38:28 +07:00
dependabot[bot] 6443f058c1 Merge pull request #7 from datakrama/dependabot/github_actions/actions/checkout-2.4.0 2021-11-08 12:00:30 +00:00
dependabot[bot] c05034041f chore(deps): bump actions/checkout from 2.3.5 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-02 20:11:55 +00:00
6 changed files with 181 additions and 75 deletions
+43 -31
View File
@@ -17,7 +17,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.5 uses: actions/checkout@v4
- name: Update action.yml to build locally - name: Update action.yml to build locally
run: | run: |
@@ -25,7 +25,7 @@ jobs:
cat action.yml cat action.yml
- name: Get sample PKGBUILD - name: Get sample PKGBUILD
run: wget https://github.com/datakrama/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD run: wget https://github.com/${{ github.repository_owner }}/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
- name: Running test - name: Running test
uses: ./ uses: ./
@@ -42,18 +42,25 @@ jobs:
git diff .SRCINFO git diff .SRCINFO
publish: publish:
name: Publish container image name: Publish OCI image
needs: pretest needs: pretest
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.5 uses: actions/checkout@v4
- name: OCI meta - name: Log in to ghcr.io
id: meta uses: redhat-actions/podman-login@v1
uses: docker/metadata-action@v3 with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: OCI metadata
id: metadata
uses: docker/metadata-action@v5
with: with:
images: ghcr.io/${{ github.repository }} images: ghcr.io/${{ github.repository }}
tags: | tags: |
@@ -64,43 +71,48 @@ jobs:
type=semver,pattern={{major}} type=semver,pattern={{major}}
type=sha type=sha
- name: Set up QEMU - name: Build image
uses: docker/setup-qemu-action@v1 id: build
uses: redhat-actions/buildah-build@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GHCR
uses: docker/login-action@v1
with: with:
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
containerfiles: |
./Dockerfile
extra-args: |
--pull
- name: Push to ghcr.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} extra-args: |
password: ${{ secrets.GITHUB_TOKEN }} --disable-content-trust
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
test: test:
name: Test (with prebuilt Container Image) name: Test (with prebuilt OCI Image)
needs: publish needs: publish
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.5 uses: actions/checkout@v4
- name: Get sample PKGBUILD - name: Get sample PKGBUILD
run: wget https://github.com/datakrama/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD run: wget https://github.com/${{ github.repository_owner }}/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
- name: Update action.yml to use edge tagged container image - name: Update action.yml to use edge tagged container image
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
run: | run: |
sed -i 's/.*image\:.*/ image\: \"docker\:\/\/ghcr.io\/${{ github.repository_owner }}\/${{ github.event.repository.name }}\:edge\"/' action.yml REPOSITORY_OWNER=${{ github.repository_owner }}
REPOSITORY_OWNER=$(echo $REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')
REPOSITORY_NAME=${{ github.event.repository.name }}
REPOSITORY_NAME=$(echo $REPOSITORY_NAME | tr '[:upper:]' '[:lower:]')
sed -i "s/.*image\:.*/ image\: \"docker\:\/\/ghcr.io\/${REPOSITORY_OWNER}\/${REPOSITORY_NAME}\:edge\"/" action.yml
cat action.yml cat action.yml
- name: Running test - name: Running test
@@ -125,11 +137,11 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.5 uses: actions/checkout@v4
- name: Get branch/tag names - name: Get branch/tag names
id: branch-name id: branch-name
uses: tj-actions/branch-names@v5 uses: tj-actions/branch-names@v8
with: with:
strip_tag_prefix: "v" strip_tag_prefix: "v"
+69 -7
View File
@@ -7,6 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [2.2.1] - 2024-02-19
### Fixed
- Can't pull docker image, so sorry guys
## [2.2.0] - 2022-08-05
### Added
- Option to update archlinux-keyring - by @ReenigneArcher
- Make repository name lowercase - by @ReenigneArcher
## [2.1.1] - 2022-05-15
### Fixed
- Wrong conditional using paru
## [2.1.0] - 2022-05-05
### Added
- Option to resolve deps using paru (from AUR) - by @kamack38
## [2.0.3] - 2022-02-02
### Fixed
- Copied PKGBUILD file has wrong permission
## [2.0.2] - 2022-02-02
### Fixed
- CI can not read changelog
## [2.0.1] - 2022-02-02
### Fixed
- Wrong OCI image tag at action.yml
## [2.0.0] - 2022-02-02
### Changed
- Move repo from hapakaien to hapakaien
- `builder` user is added to sudoers directly instead of via the wheel group
- Replace Docker with Buildah in CI
### Fixed
- `builder` is not in the sudoers file
## [1.1.1] - 2021-10-26 ## [1.1.1] - 2021-10-26
### Fixed ### Fixed
@@ -49,10 +104,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release - Initial release
[Unreleased]: https://github.com/datakrama/archlinux-package-action/compare/v1.1.1...HEAD [Unreleased]: https://github.com/hapakaien/archlinux-package-action/compare/v2.2.0...HEAD
[1.1.1]: https://github.com/datakrama/archlinux-package-action/compare/v1.1.0...v1.1.1 [2.2.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.1.1...v2.2.0
[1.1.0]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.3...v1.1.0 [2.1.1]: https://github.com/hapakaien/archlinux-package-action/compare/v2.1.0...v2.1.1
[1.0.3]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.2...v1.0.3 [2.1.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.3...v2.1.0
[1.0.2]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.1...v1.0.2 [2.0.3]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.2...v2.0.3
[1.0.1]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.0...v1.0.1 [2.0.2]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.1...v2.0.2
[1.0.0]: https://github.com/datakrama/archlinux-package-action/releases/tag/v1.0.0 [2.0.1]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/hapakaien/archlinux-package-action/compare/v1.1.1...v2.0.0
[1.1.1]: https://github.com/hapakaien/archlinux-package-action/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/hapakaien/archlinux-package-action/compare/v1.0.3...v1.1.0
[1.0.3]: https://github.com/hapakaien/archlinux-package-action/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/hapakaien/archlinux-package-action/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/hapakaien/archlinux-package-action/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/hapakaien/archlinux-package-action/releases/tag/v1.0.0
+8 -5
View File
@@ -5,11 +5,14 @@ FROM docker.io/library/archlinux:base-devel
RUN pacman -Syu --needed --noconfirm pacman-contrib namcap git RUN pacman -Syu --needed --noconfirm pacman-contrib namcap git
# Setup user # Setup user
RUN useradd --create-home --shell /bin/bash builder && \ RUN useradd -m builder && \
passwd --delete builder && \ echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
chown -vR builder:builder /home/builder && \ WORKDIR /home/builder
usermod -aG wheel builder && \ USER builder
echo 'wheel ALL=(ALL:ALL) ALL' >> /etc/sudoers
# Install paru
RUN git clone https://aur.archlinux.org/paru-bin.git
RUN cd paru-bin && makepkg -si --noconfirm
# Copy files # Copy files
COPY LICENSE README.md / COPY LICENSE README.md /
+17 -15
View File
@@ -1,8 +1,8 @@
# Arch Linux's package tools action # Arch Linux's package tools action
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/datakrama/archlinux-package-action/CI?label=CI&style=flat-square)](https://github.com/datakrama/archlinux-package-action/actions) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/datakrama/archlinux-package-action?style=flat-square)](https://github.com/datakrama/archlinux-package-action/releases) [![GitHub](https://img.shields.io/github/license/datakrama/archlinux-package-action?style=flat-square)](./LICENSE) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/heyhusen/archlinux-package-action/main.yml?style=flat-square&label=CI)](https://github.com/heyhusen/archlinux-package-action/actions) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/heyhusen/archlinux-package-action?style=flat-square)](https://github.com/heyhusen/archlinux-package-action/releases) [![GitHub](https://img.shields.io/github/license/heyhusen/archlinux-package-action?style=flat-square)](./LICENSE)
This action allows running tools needed for creating Arch Linux (and AUR) package. This action allows running tools needed for creating Arch Linux (and AUR) package.
Here's what this action can do: Here's what this action can do:
- Update `pkgver`, `pkgrel`, or checksums on PKGBUILD file - Update `pkgver`, `pkgrel`, or checksums on PKGBUILD file
@@ -21,15 +21,17 @@ Here's what this action can do:
Following inputs can be used as `step.with` keys Following inputs can be used as `step.with` keys
| Name | Type | Default | Required | Description | | Name | Type | Default | Required | Description |
|-------------------|-----------|-------------------------------|-----------|---------------------------------------| | -------------------------- | ------- | ------------------ | -------- | -------------------------------------------------------------------------------- |
| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE | | `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE |
| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD | | `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD |
| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD | | `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD |
| `updpkgsums` | Boolean | `false` | `false` | Update checksums on your PKGBUILD | | `updpkgsums` | Boolean | `false` | `false` | Update checksums on your PKGBUILD |
| `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO | | `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO |
| `namcap` | Boolean | `true` | `false` | Validate PKGBUILD | | `namcap` | Boolean | `true` | `false` | Validate PKGBUILD |
| `flags` | String | `-cfs --noconfirm` | `false` | Flags after `makepkg` command. Leave this empty will disable this command. | | `flags` | String | `-cfs --noconfirm` | `false` | Flags after `makepkg` command. Leave this empty will disable this command. |
| `aur` | Boolean | `false` | `false` | Resolve dependencies using paru |
| `update_archlinux_keyring` | Boolean | `true` | `false` | Update the archlinux keyring |
### Examples ### Examples
@@ -52,7 +54,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Validate package - name: Validate package
uses: datakrama/archlinux-package-action@v1 uses: heyhusen/archlinux-package-action@v2
``` ```
#### 2. Only generate .SRCINFO #### 2. Only generate .SRCINFO
@@ -72,7 +74,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Validate package - name: Validate package
uses: datakrama/archlinux-package-action@v1 uses: heyhusen/archlinux-package-action@v2
with: with:
flags: '' flags: ''
namcap: false namcap: false
@@ -96,7 +98,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Validate package - name: Validate package
uses: datakrama/archlinux-package-action@v1 uses: heyhusen/archlinux-package-action@v2
with: with:
flags: '' flags: ''
namcap: false namcap: false
@@ -120,7 +122,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Validate package - name: Validate package
uses: datakrama/archlinux-package-action@v1 uses: heyhusen/archlinux-package-action@v2
with: with:
path: package path: package
flags: '-si --noconfirm' flags: '-si --noconfirm'
+12 -2
View File
@@ -1,7 +1,7 @@
# https://help.github.com/en/articles/metadata-syntax-for-github-actions # https://help.github.com/en/articles/metadata-syntax-for-github-actions
name: "Arch Linux's package action" name: "Arch Linux's package action"
description: "GitHub Action to run Arch Linux's package tools" description: "GitHub Action to run Arch Linux's package tools"
author: 'datakrama' author: 'heyhusen'
branding: branding:
icon: 'package' icon: 'package'
color: 'blue' color: 'blue'
@@ -35,10 +35,18 @@ inputs:
description: 'Validate package with namcap' description: 'Validate package with namcap'
default: 'true' default: 'true'
required: false required: false
aur:
description: 'Resolve dependencies using paru'
default: 'false'
required: false
update_archlinux_keyring:
description: 'Update archlinux-keyring'
default: 'true'
required: false
runs: runs:
using: 'docker' using: 'docker'
image: 'docker://ghcr.io/datakrama/archlinux-package-action:1' image: 'docker://ghcr.io/heyhusen/archlinux-package-action:2'
args: args:
- ${{ inputs.path }} - ${{ inputs.path }}
- ${{ inputs.pkgver }} - ${{ inputs.pkgver }}
@@ -47,3 +55,5 @@ runs:
- ${{ inputs.srcinfo }} - ${{ inputs.srcinfo }}
- ${{ inputs.flags }} - ${{ inputs.flags }}
- ${{ inputs.namcap }} - ${{ inputs.namcap }}
- ${{ inputs.aur }}
- ${{ inputs.update_archlinux_keyring }}
+32 -15
View File
@@ -2,15 +2,24 @@
set -e set -e
# Set path # Set path
echo "::group::Copying file from $WORKPATH to /tmp/gh-action"
WORKPATH=$GITHUB_WORKSPACE/$INPUT_PATH WORKPATH=$GITHUB_WORKSPACE/$INPUT_PATH
HOME=/home/builder
echo "::group::Copying files from $WORKPATH to $HOME/gh-action"
# Set path permision # Set path permision
sudo -u builder mkdir /tmp/gh-action cd $HOME
sudo -u builder cp -rfv "$GITHUB_WORKSPACE"/.git /tmp/gh-action/.git mkdir gh-action
sudo -u builder cp -fv "$WORKPATH"/PKGBUILD /tmp/gh-action/PKGBUILD cd gh-action
cd /tmp/gh-action cp -rfv "$GITHUB_WORKSPACE"/.git ./
cp -fv "$WORKPATH"/PKGBUILD ./
echo "::endgroup::" echo "::endgroup::"
# Update archlinux-keyring
if [[ $INPUT_ARCHLINUX_KEYRING == true ]]; then
echo "::group::Updating archlinux-keyring"
pacman -S archlinux-keyring
echo "::endgroup::"
fi
# Update pkgver # Update pkgver
if [[ -n $INPUT_PKGVER ]]; then if [[ -n $INPUT_PKGVER ]]; then
echo "::group::Updating pkgver on PKGBUILD" echo "::group::Updating pkgver on PKGBUILD"
@@ -30,7 +39,7 @@ fi
# Update checksums # Update checksums
if [[ $INPUT_UPDPKGSUMS == true ]]; then if [[ $INPUT_UPDPKGSUMS == true ]]; then
echo "::group::Updating checksums on PKGBUILD" echo "::group::Updating checksums on PKGBUILD"
sudo -u builder updpkgsums updpkgsums
git diff PKGBUILD git diff PKGBUILD
echo "::endgroup::" echo "::endgroup::"
fi fi
@@ -38,7 +47,7 @@ fi
# Generate .SRCINFO # Generate .SRCINFO
if [[ $INPUT_SRCINFO == true ]]; then if [[ $INPUT_SRCINFO == true ]]; then
echo "::group::Generating new .SRCINFO based on PKGBUILD" echo "::group::Generating new .SRCINFO based on PKGBUILD"
sudo -u builder makepkg --printsrcinfo > .SRCINFO makepkg --printsrcinfo >.SRCINFO
git diff .SRCINFO git diff .SRCINFO
echo "::endgroup::" echo "::endgroup::"
fi fi
@@ -50,16 +59,24 @@ if [[ $INPUT_NAMCAP == true ]]; then
echo "::endgroup::" echo "::endgroup::"
fi fi
# Run makepkg # Install depends using paru from aur
if [[ -n $INPUT_FLAGS ]]; then if [[ $INPUT_AUR == true ]]; then
echo "::group::Running makepkg with flags" echo "::group::Installing depends using paru"
sudo -u builder makepkg $INPUT_FLAGS source PKGBUILD
paru -Syu --removemake --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
echo "::endgroup::" echo "::endgroup::"
fi fi
echo "::group::Copying files from /tmp/gh-action to $WORKPATH" # Run makepkg
cp -fv /tmp/gh-action/PKGBUILD "$WORKPATH"/PKGBUILD if [[ -n $INPUT_FLAGS ]]; then
if [[ -e /tmp/gh-action/.SRCINFO ]]; then echo "::group::Running makepkg with flags"
cp -fv /tmp/gh-action/.SRCINFO "$WORKPATH"/.SRCINFO makepkg $INPUT_FLAGS
echo "::endgroup::"
fi
echo "::group::Copying files from $HOME/gh-action to $WORKPATH"
sudo cp -fv PKGBUILD "$WORKPATH"/PKGBUILD
if [[ -e .SRCINFO ]]; then
sudo cp -fv .SRCINFO "$WORKPATH"/.SRCINFO
fi fi
echo "::endgroup::" echo "::endgroup::"