Skip to content

Merge pull request #188 from LunNova/renovate/all-minor-patch #81

Merge pull request #188 from LunNova/renovate/all-minor-patch

Merge pull request #188 from LunNova/renovate/all-minor-patch #81

Workflow file for this run

name: Docker push
permissions:
contents: read
packages: write
on:
push:
branches: [ main, dev ]
tags: [ 'v*' ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Set tag var
id: tagvars
run: |
GITHUB_REF_STRIPPED=${GITHUB_REF#refs/*/}
echo ::set-output name=tag::${GITHUB_REF_STRIPPED}
- uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2
- name: Cache Docker layers
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Login to GitHub Container Registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
with:
push: true
tags: ghcr.io/lunnova/no-more-mr-dice-guy:${{ steps.tagvars.outputs.tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache