Skip to content

Update Rust crate serde_json to v1.0.120 #2048

Update Rust crate serde_json to v1.0.120

Update Rust crate serde_json to v1.0.120 #2048

Workflow file for this run

name: Docker Build
on:
pull_request:
types:
- labeled
- edited
- synchronize
- unlabeled
branches:
- main
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/setup-node@v4
- uses: actions/checkout@v4
- run: |
npx -y prettier --check ./
# npx -y shellcheck ./.github/scripts/*.sh ./src/scripts/*.sh
step_summary_meta:
runs-on: ubuntu-latest
steps:
- run: |
PUSH=${{ contains(github.event.pull_request.labels.*.name, 'canary') }}
if [ "${PUSH}" = "true" ]; then
echo "## Image Published!" >> $GITHUB_STEP_SUMMARY
echo "> These are development images, expect bugs!!"
fi
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 1
matrix:
image: [odin, valheim]
include:
- image: odin
push: true
- image: valheim
push: ${{ contains(github.event.pull_request.labels.*.name, 'canary') }}
steps:
- uses: actions/checkout@v4 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: mbround18
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v5
with:
# list of Docker images to use as base name for tags
images: |
mbround18/${{ matrix.image }}
# generate Docker tags based on the following events/attributes
tags: |
type=sha
- name: Build ${{ matrix.image }}
id: docker_build
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.${{ matrix.image }}
push: ${{ matrix.push }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=mbround18/${{ matrix.image }}:buildcache
cache-to: type=registry,ref=mbround18/${{ matrix.image }}:buildcache,mode=max
build-args: |
"GITHUB_SHA=${GITHUB_SHA}"
"GITHUB_REF=${GITHUB_REF}"
"GITHUB_REPOSITORY=${GITHUB_REPOSITORY}"
"ODIN_IMAGE_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"
- name: Publish Image Summary
if: matrix.push
run: |
{
echo "\`\`\`";
if [ "${{ matrix.image }}" = "odin" ]; then
echo "docker run ${{ steps.meta.outputs.tags }}";
else
echo "docker run --rm -it \\";
echo " -e PASSWORD=\"123abc\" \\";
echo " -e PUBLIC=\"1\" \\";
echo " ${{ steps.meta.outputs.tags }}";
fi;
echo "\`\`\`";
} >> $GITHUB_STEP_SUMMARY