Skip to content

Commit

Permalink
Update CI for ps2-packer
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Mar 27, 2024
1 parent 26bfd0f commit 98afa28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
runs-on: ubuntu-latest
container: ${{ github.repository_owner }}/ps2sdk:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
apk add build-base zlib-dev
- name: Compile project
run: |
make clean all install
make -j $(getconf _NPROCESSORS_ONLN) clean
make -j $(getconf _NPROCESSORS_ONLN) all
make -j $(getconf _NPROCESSORS_ONLN) install
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Extract DOCKER_TAG using tag name
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -28,13 +28,13 @@ jobs:
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
- name: Login to Github registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io

- uses: docker/build-push-action@v2
- uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_TAG }}
Expand All @@ -47,7 +47,7 @@ jobs:
echo "NEW_DISPATCH_ACTION=$DISPATCH_ACTION" >> $GITHUB_ENV
- name: Repository Dispatch to ps2link
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
repository: ${{ github.repository_owner }}/ps2link
token: ${{ secrets.DISPATCH_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ FROM $BASE_DOCKER_IMAGE
COPY . /src

RUN apk add build-base zlib-dev
RUN cd /src && make clean all install
RUN cd /src && \
make -j $(getconf _NPROCESSORS_ONLN) clean && \
make -j $(getconf _NPROCESSORS_ONLN) && \
make -j $(getconf _NPROCESSORS_ONLN) install

# Second stage of Dockerfile
FROM alpine:latest
Expand Down

0 comments on commit 98afa28

Please sign in to comment.