mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-12-23 16:42:00 +01:00
Change docker registry to ghcr.io
This commit is contained in:
parent
7f68073112
commit
85a6e35188
4
.github/workflows/pr.yml
vendored
4
.github/workflows/pr.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: clang-format
|
||||
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:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format-lib
|
||||
@ -29,7 +29,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./plugins/example_plugin/src
|
||||
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./plugins/example_plugin/src
|
||||
build-examples:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format-examples
|
||||
|
56
.github/workflows/push_image.yml
vendored
56
.github/workflows/push_image.yml
vendored
@ -3,6 +3,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
clang-format-lib:
|
||||
runs-on: ubuntu-22.04
|
||||
@ -10,7 +15,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: clang-format
|
||||
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:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format-lib
|
||||
@ -26,7 +31,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./plugins/example_plugin/src
|
||||
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./plugins/example_plugin/src
|
||||
build-examples:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format-examples
|
||||
@ -37,23 +42,36 @@ jobs:
|
||||
docker build . -f Dockerfile.buildexamples -t builder
|
||||
cd ./plugins/example_plugin
|
||||
docker run --rm -v ${PWD}:/project builder make
|
||||
push_image:
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-lib, build-examples]
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Get release version
|
||||
id: get_release_tag
|
||||
run: |
|
||||
echo RELEASE_VERSION=$(echo $(date '+%Y%m%d')) >> $GITHUB_ENV
|
||||
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
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
name: ${{ env.REPOSITORY_OWNER }}/${{ env.REPOSITORY_NAME }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
snapshot: true
|
||||
cache: true
|
||||
tags: "latest, ${{ env.RELEASE_VERSION }}"
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value={{date 'YYYYMMDD'}}-{{sha}}
|
||||
type=raw,value={{date 'YYYYMMDD'}}
|
||||
type=raw,value=latest
|
||||
|
||||
- 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:20230218
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20230218
|
||||
|
||||
WORKDIR tmp_build
|
||||
COPY . .
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM wiiuenv/devkitppc:20230218
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20230218
|
||||
|
||||
WORKDIR tmp_build
|
||||
COPY . .
|
||||
@ -8,7 +8,7 @@ WORKDIR /artifacts
|
||||
FROM scratch as libwups
|
||||
COPY --from=0 /artifacts /artifacts
|
||||
|
||||
FROM wiiuenv/devkitppc:20230218
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20230218
|
||||
|
||||
COPY --from=libwups /artifacts $DEVKITPRO
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
FROM wiiuenv/devkitppc:20230218
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20230218
|
||||
|
||||
WORKDIR project
|
@ -20,12 +20,12 @@ Then you can compile and install this lib via `make install`.
|
||||
A prebuilt version of this lib can found on dockerhub. To use it for your projects, add this to your Dockerfile.
|
||||
```
|
||||
[...]
|
||||
COPY --from=wiiuenv/wiiupluginsystem:[tag] /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:[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/wiiupluginsystem/tags).
|
||||
Replace [tag] with a tag you want to use, a list of tags can be found [here](https://github.com/wiiu-env/WiiUPluginSystem/pkgs/container/wiiupluginsystem/versions).
|
||||
It's highly recommended to pin the version to the **latest date** instead of using `latest`.
|
||||
|
||||
## Format the code via docker
|
||||
|
||||
`docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./include ./libraries ./plugins/example_plugin/src -i`
|
||||
`docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./include ./libraries ./plugins/example_plugin/src -i`
|
||||
|
Loading…
Reference in New Issue
Block a user