Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cd2e2d62b6 | |||
| 7926f4fb39 | |||
| 863b0d9617 | |||
| 360be955b0 | |||
| 6443f058c1 | |||
| c05034041f | |||
| d90b1b2689 | |||
| 3747c6e38e | |||
| 10816168b7 | |||
| 87fb26e440 | |||
| 38bb9b95aa |
+34
-28
@@ -17,7 +17,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- 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/hapakaien/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||||
|
|
||||||
- name: Running test
|
- name: Running test
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -42,17 +42,24 @@ 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
|
uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- name: OCI meta
|
- name: Log in to ghcr.io
|
||||||
id: meta
|
uses: redhat-actions/podman-login@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: OCI metadata
|
||||||
|
id: metadata
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v3
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}
|
images: ghcr.io/${{ github.repository }}
|
||||||
@@ -64,38 +71,37 @@ 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.4
|
uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- name: Get sample PKGBUILD
|
- name: Get sample PKGBUILD
|
||||||
run: wget https://github.com/datakrama/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
run: wget https://github.com/hapakaien/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'
|
||||||
@@ -125,7 +131,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- name: Get branch/tag names
|
- name: Get branch/tag names
|
||||||
id: branch-name
|
id: branch-name
|
||||||
|
|||||||
+26
-5
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [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
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Wrong `.git` folder when using `path` parameter
|
||||||
|
|
||||||
## [1.1.0] - 2021-10-02
|
## [1.1.0] - 2021-10-02
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@@ -43,8 +61,11 @@ 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.0...HEAD
|
[Unreleased]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.0...HEAD
|
||||||
[1.0.3]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.2...v1.0.3
|
[2.0.0]: https://github.com/hapakaien/archlinux-package-action/compare/v1.1.1...v2.0.0
|
||||||
[1.0.2]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.1...v1.0.2
|
[1.1.1]: https://github.com/hapakaien/archlinux-package-action/compare/v1.1.0...v1.1.1
|
||||||
[1.0.1]: https://github.com/datakrama/archlinux-package-action/compare/v1.0.0...v1.0.1
|
[1.1.0]: https://github.com/hapakaien/archlinux-package-action/compare/v1.0.3...v1.1.0
|
||||||
[1.0.0]: https://github.com/datakrama/archlinux-package-action/releases/tag/v1.0.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
|
||||||
|
|||||||
+4
-5
@@ -5,11 +5,10 @@ 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
|
|
||||||
|
|
||||||
# Copy files
|
# Copy files
|
||||||
COPY LICENSE README.md /
|
COPY LICENSE README.md /
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Arch Linux's package tools action
|
# Arch Linux's package tools action
|
||||||
|
|
||||||
[](https://github.com/datakrama/archlinux-package-action/actions) [](https://github.com/datakrama/archlinux-package-action/releases) [](./LICENSE)
|
[](https://github.com/hapakaien/archlinux-package-action/actions) [](https://github.com/hapakaien/archlinux-package-action/releases) [](./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:
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Validate package
|
- name: Validate package
|
||||||
uses: datakrama/archlinux-package-action@v1
|
uses: hapakaien/archlinux-package-action@v2
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. Only generate .SRCINFO
|
#### 2. Only generate .SRCINFO
|
||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Validate package
|
- name: Validate package
|
||||||
uses: datakrama/archlinux-package-action@v1
|
uses: hapakaien/archlinux-package-action@v2
|
||||||
with:
|
with:
|
||||||
flags: ''
|
flags: ''
|
||||||
namcap: false
|
namcap: false
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Validate package
|
- name: Validate package
|
||||||
uses: datakrama/archlinux-package-action@v1
|
uses: hapakaien/archlinux-package-action@v2
|
||||||
with:
|
with:
|
||||||
flags: ''
|
flags: ''
|
||||||
namcap: false
|
namcap: false
|
||||||
@@ -120,7 +120,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Validate package
|
- name: Validate package
|
||||||
uses: datakrama/archlinux-package-action@v1
|
uses: hapakaien/archlinux-package-action@v2
|
||||||
with:
|
with:
|
||||||
path: package
|
path: package
|
||||||
flags: '-si --noconfirm'
|
flags: '-si --noconfirm'
|
||||||
|
|||||||
+2
-2
@@ -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: 'hapakaien'
|
||||||
branding:
|
branding:
|
||||||
icon: 'package'
|
icon: 'package'
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -38,7 +38,7 @@ inputs:
|
|||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'docker://ghcr.io/datakrama/archlinux-package-action:1'
|
image: 'docker://ghcr.io/hapakaien/archlinux-package-action:1'
|
||||||
args:
|
args:
|
||||||
- ${{ inputs.path }}
|
- ${{ inputs.path }}
|
||||||
- ${{ inputs.pkgver }}
|
- ${{ inputs.pkgver }}
|
||||||
|
|||||||
+14
-12
@@ -2,13 +2,15 @@
|
|||||||
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 "$WORKPATH"/.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 ./
|
||||||
|
sudo cp -fv "$WORKPATH"/PKGBUILD ./
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
# Update pkgver
|
# Update pkgver
|
||||||
@@ -30,7 +32,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 +40,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
|
||||||
@@ -53,13 +55,13 @@ fi
|
|||||||
# Run makepkg
|
# Run makepkg
|
||||||
if [[ -n $INPUT_FLAGS ]]; then
|
if [[ -n $INPUT_FLAGS ]]; then
|
||||||
echo "::group::Running makepkg with flags"
|
echo "::group::Running makepkg with flags"
|
||||||
sudo -u builder makepkg $INPUT_FLAGS
|
makepkg $INPUT_FLAGS
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::group::Copying files from /tmp/gh-action to $WORKPATH"
|
echo "::group::Copying files from $HOME/gh-action to $WORKPATH"
|
||||||
cp -fv /tmp/gh-action/PKGBUILD "$WORKPATH"/PKGBUILD
|
sudo cp -fv PKGBUILD "$WORKPATH"/PKGBUILD
|
||||||
if [[ -e /tmp/gh-action/.SRCINFO ]]; then
|
if [[ -e .SRCINFO ]]; then
|
||||||
cp -fv /tmp/gh-action/.SRCINFO "$WORKPATH"/.SRCINFO
|
sudo cp -fv .SRCINFO "$WORKPATH"/.SRCINFO
|
||||||
fi
|
fi
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|||||||
Reference in New Issue
Block a user