Skip to content

updated revolver

updated revolver #44

Workflow file for this run

name: Publish to Docker Registry
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
docker:
# skip this workflow if the commit message contains [ci skip]
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
# enable built or pulled docker images to be cached
- name: Enable Docker Cache
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('dependencies.sh') }}
# generate the images and tags that we'll publish to the registry
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
docker.ss13.host/starfly13
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value={{date 'YYYYMMDDHHmmss'}}
type=sha
# check out the code from the repository
- name: Checkout Project
uses: actions/checkout@v4
# set up the build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# log in to the registry
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: docker.ss13.host
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
# build and push to the registry
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max