Compare commits

..

No commits in common. "49efa4c8386b6bd9655ecce1de0877cb2738f4da" and "f3c45c52ad512b31d84f8254b7ad228aa4e0bab9" have entirely different histories.

5 changed files with 36 additions and 46 deletions

View File

@ -4,17 +4,17 @@ on: [pull_request]
jobs: jobs:
clang-format: clang-format:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: clang-format - name: clang-format
run: | run: |
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./source ./include docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source ./include
build-lib: build-lib:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
needs: clang-format needs: clang-format
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: build lib - name: build lib
run: | run: |
docker build . -f Dockerfile.buildlocal -t builder docker build . -f Dockerfile.buildlocal -t builder

View File

@ -3,41 +3,31 @@ on:
push: push:
branches: branches:
- main - main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
build-and-push-image: clang-format:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps: steps:
- name: Checkout repository - uses: actions/checkout@v2
uses: actions/checkout@v3 - name: clang-format
- name: Extract Docker metadata run: |
id: meta docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source ./include
uses: docker/metadata-action@v4 build:
with: runs-on: ubuntu-latest
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} needs: clang-format
tags: | steps:
type=raw,value={{date 'YYYYMMDD'}}-{{sha}} - uses: actions/checkout@master
type=raw,value={{date 'YYYYMMDD'}} - name: Get release version
type=raw,value=latest id: get_release_tag
- name: Log into registry ${{ env.REGISTRY }} run: |
uses: docker/login-action@v2.1.0 echo RELEASE_VERSION=$(echo $(date '+%Y%m%d')) >> $GITHUB_ENV
with: echo REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//" | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
registry: ${{ env.REGISTRY }} echo REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}' | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
username: ${{ github.actor }} - name: Publish to Registry
password: ${{ secrets.CI_PAT_WRITE_PACKAGE }} uses: elgohr/Publish-Docker-Github-Action@master
with:
- name: Build and push Docker image name: ${{ env.REPOSITORY_OWNER }}/${{ env.REPOSITORY_NAME }}
uses: docker/build-push-action@v4 username: ${{ secrets.DOCKER_USERNAME }}
with: password: ${{ secrets.DOCKER_PASSWORD }}
context: . snapshot: true
tags: ${{ steps.meta.outputs.tags }} cache: true
labels: ${{ steps.meta.outputs.labels }} tags: "latest, ${{ env.RELEASE_VERSION }}"
push: true

View File

@ -1,4 +1,4 @@
FROM ghcr.io/wiiu-env/devkitppc:20220806 FROM wiiuenv/devkitppc:20220806
WORKDIR tmp_build WORKDIR tmp_build
COPY . . COPY . .

View File

@ -1,3 +1,3 @@
FROM ghcr.io/wiiu-env/devkitppc:20220806 FROM wiiuenv/devkitppc:20220806
WORKDIR project WORKDIR project

View File

@ -16,12 +16,12 @@ After that you can simply include `<mocha/mocha.h>` to get access to the mocha f
A prebuilt version of this lib can found on dockerhub. To use it for your projects, add this to your Dockerfile. A prebuilt version of this lib can found on dockerhub. To use it for your projects, add this to your Dockerfile.
``` ```
[...] [...]
COPY --from=ghcr.io/wiiu-env/libmocha:[tag] /artifacts $DEVKITPRO COPY --from=wiiuenv/libmocha:[tag] /artifacts $DEVKITPRO
[...] [...]
``` ```
Replace [tag] with a tag you want to use, a list of tags can be found [here](https://github.com/orgs/wiiu-env/packages/container/libmocha/versions). Replace [tag] with a tag you want to use, a list of tags can be found [here](https://hub.docker.com/r/wiiuenv/libmocha/tags).
It's highly recommended to pin the version to the **latest date** instead of using `latest`. It's highly recommended to pin the version to the **latest date** instead of using `latest`.
## Format the code via docker ## Format the code via docker
`docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./source ./include -i` `docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source ./include -i`