mirror of
https://github.com/pret/dsbuild.git
synced 2026-09-26 13:33:03 -04:00
Initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: Build Docker container
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ github.repository == 'pret/dsbuild' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
- name: Get short sha
|
||||
id: short-sha
|
||||
run: |
|
||||
echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
with:
|
||||
push: ${{ github.actor != 'nektos/act' }}
|
||||
tags: |
|
||||
ghcr.io/pret/dsbuild:latest
|
||||
ghcr.io/pret/dsbuild:${{ steps.short-sha.outputs.short-sha }}-${{ github.run_number }}
|
||||
Reference in New Issue
Block a user