mirror of
https://github.com/wiiu-env/WiiUModuleSystem.git
synced 2024-11-22 09:49:18 +01:00
Change docker registry to ghcr.io
This commit is contained in:
parent
4002b64efe
commit
776402ffe0
4
.github/workflows/pr.yml
vendored
4
.github/workflows/pr.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: clang-format
|
- name: clang-format
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./include ./libraries
|
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./include ./libraries
|
||||||
build-lib:
|
build-lib:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: clang-format-lib
|
needs: clang-format-lib
|
||||||
@ -30,7 +30,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: clang-format
|
- name: clang-format
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./example/example_module/source
|
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./example/example_module/source
|
||||||
build-examples:
|
build-examples:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: clang-format-examples
|
needs: clang-format-examples
|
||||||
|
84
.github/workflows/push_image.yml
vendored
84
.github/workflows/push_image.yml
vendored
@ -3,57 +3,41 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang-format-lib:
|
build-and-push-image:
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: clang-format
|
|
||||||
run: |
|
|
||||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./include ./libraries
|
|
||||||
build-lib:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: clang-format-lib
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: build binary
|
|
||||||
run: |
|
|
||||||
docker build . -f Dockerfile.buildlocal -t builder
|
|
||||||
docker run --rm -v ${PWD}:/project builder make
|
|
||||||
clang-format-examples:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: clang-format
|
|
||||||
run: |
|
|
||||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./example/example_module/source
|
|
||||||
build-examples:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: clang-format-examples
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: build binary
|
|
||||||
run: |
|
|
||||||
docker build . -f Dockerfile.buildexamples -t builder
|
|
||||||
cd ./example/example_module
|
|
||||||
docker run --rm -v ${PWD}:/project builder make
|
|
||||||
push_image:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-lib, build-examples]
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- name: Checkout repository
|
||||||
- name: Get release version
|
uses: actions/checkout@v3
|
||||||
id: get_release_tag
|
- name: Extract Docker metadata
|
||||||
run: |
|
id: meta
|
||||||
echo RELEASE_VERSION=$(echo $(date '+%Y%m%d')) >> $GITHUB_ENV
|
uses: docker/metadata-action@v4
|
||||||
echo REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//" | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
|
||||||
echo REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}' | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
|
||||||
- name: Publish to Registry
|
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
|
||||||
with:
|
with:
|
||||||
name: ${{ env.REPOSITORY_OWNER }}/${{ env.REPOSITORY_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
tags: |
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
type=raw,value={{date 'YYYYMMDD'}}-{{sha}}
|
||||||
snapshot: true
|
type=raw,value={{date 'YYYYMMDD'}}
|
||||||
cache: true
|
type=raw,value=latest
|
||||||
tags: "latest, ${{ env.RELEASE_VERSION }}"
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
|
uses: docker/login-action@v2.1.0
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.CI_PAT_WRITE_PACKAGE }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
push: true
|
@ -1,4 +1,4 @@
|
|||||||
FROM wiiuenv/devkitppc:20220806
|
FROM ghcr.io/wiiu-env/devkitppc:20220806
|
||||||
|
|
||||||
WORKDIR build
|
WORKDIR build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM wiiuenv/devkitppc:20220806
|
FROM ghcr.io/wiiu-env/devkitppc:20220806
|
||||||
|
|
||||||
WORKDIR build
|
WORKDIR build
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -8,7 +8,7 @@ WORKDIR /artifacts
|
|||||||
FROM scratch as libwums
|
FROM scratch as libwums
|
||||||
COPY --from=0 /artifacts /artifacts
|
COPY --from=0 /artifacts /artifacts
|
||||||
|
|
||||||
FROM wiiuenv/devkitppc:20220806
|
FROM ghcr.io/wiiu-env/devkitppc:20220806
|
||||||
|
|
||||||
COPY --from=libwums /artifacts $DEVKITPRO
|
COPY --from=libwums /artifacts $DEVKITPRO
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
FROM wiiuenv/devkitppc:20220806
|
FROM ghcr.io/wiiu-env/devkitppc:20220806
|
||||||
|
|
||||||
WORKDIR project
|
WORKDIR project
|
@ -68,13 +68,13 @@ if (OSDynLoad_FindExport(sModuleHandle, FALSE, "MyCustomFunction", (void**) &sMy
|
|||||||
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.
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
[...]
|
[...]
|
||||||
COPY --from=wiiuenv/wiiumodulesystem:[tag] /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:[tag] /artifacts $DEVKITPRO
|
||||||
[...]
|
[...]
|
||||||
```
|
```
|
||||||
Replace [tag] with a tag you want to use, a list of tags can be found [here](https://hub.docker.com/r/wiiuenv/wiiumodulesystem/tags).
|
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/wiiumodulesystem/versions).
|
||||||
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
|
||||||
```bash
|
```bash
|
||||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./include ./libraries ./example/example_module/source -i
|
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./include ./libraries ./example/example_module/source -i
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user