mirror of
https://github.com/shlinkio/shlink.git
synced 2025-01-04 21:24:58 -06:00
Merge pull request #1515 from acelaya-forks/feature/reusable-docker-build
Migrated docker build to a reusable workflow
This commit is contained in:
commit
3088298e6b
29
.github/workflows/docker-image-build.yml
vendored
29
.github/workflows/docker-image-build.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Build docker image
|
name: Build and publish docker image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,26 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
uses: shlinkio/github-actions/.github/workflows/docker-build-and-publish.yml@main
|
||||||
steps:
|
secrets: inherit
|
||||||
- name: Checkout code
|
with:
|
||||||
uses: actions/checkout@v3
|
build-and-publish-script: bash ./docker/build
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
- name: Login to docker hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Login to GitHub container registry
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GHCR_PAT }}
|
|
||||||
- name: Build and push the image
|
|
||||||
run: bash ./docker/build
|
|
||||||
|
Loading…
Reference in New Issue
Block a user