2020-08-12 22:45:53 +02:00
|
|
|
name: Publish Docker Image
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-02-17 11:55:31 +01:00
|
|
|
- main
|
2020-08-12 22:45:53 +02:00
|
|
|
jobs:
|
2022-02-13 16:12:10 +01:00
|
|
|
clang-format:
|
2022-09-04 17:31:30 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2022-02-13 16:12:10 +01:00
|
|
|
steps:
|
2023-02-17 11:55:31 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: clang-format
|
|
|
|
run: |
|
|
|
|
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source ./include
|
2020-08-12 22:45:53 +02:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-02-13 16:12:10 +01:00
|
|
|
needs: clang-format
|
2020-08-12 22:45:53 +02:00
|
|
|
steps:
|
2023-02-17 11:55:31 +01:00
|
|
|
- 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@v5
|
|
|
|
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 }}"
|