mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-11-20 09:39:18 +01:00
50 lines
1.7 KiB
YAML
50 lines
1.7 KiB
YAML
name: Publish Docker Image
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
clang-format-lib:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: clang-format
|
|
run: |
|
|
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./include ./libraries
|
|
clang-format-examples:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- 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
|
|
build-examples:
|
|
runs-on: ubuntu-18.04
|
|
needs: clang-format-examples
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: build binary
|
|
run: |
|
|
docker build . -f Dockerfile.buildexamples -t builder
|
|
cd ./plugins/example_plugin
|
|
docker run --rm -v ${PWD}:/project builder make
|
|
push_image:
|
|
runs-on: ubuntu-latest
|
|
needs: clang-format-lib
|
|
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
|
|
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 }}" |