mirror of
https://git.sr.ht/~ashkeel/sourcehut-mirror-bridge
synced 2024-12-21 22:32:19 +00:00
add action
Some checks failed
Build and push Docker image / build-and-publish (push) Failing after 4s
Some checks failed
Build and push Docker image / build-and-publish (push) Failing after 4s
This commit is contained in:
parent
df1bda13e6
commit
36b93b0fce
1 changed files with 32 additions and 0 deletions
32
.forgejo/workflows/docker.yaml
Normal file
32
.forgejo/workflows/docker.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Build and push Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build latest
|
||||
uses: https://codeberg.org/umglurf/kaniko-action@main
|
||||
with:
|
||||
cache: true
|
||||
cache_repo: ${{ vars.DOCKER_REGISTRY }}/${{ github.repository }}/cache
|
||||
credentials: |
|
||||
${{ vars.DOCKER_REGISTRY }}=${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}
|
||||
destinations: |
|
||||
${{ vars.DOCKER_REGISTRY }}/${{ github.repository }}:latest ${{ vars.REGISTRY_URL }}/${{ github.repository }}:${{ github.sha }}
|
||||
push: "true"
|
||||
if: github.ref == 'refs/heads/master'
|
||||
- name: Build ref
|
||||
uses: https://codeberg.org/umglurf/kaniko-action@main
|
||||
with:
|
||||
cache: true
|
||||
cache_repo: ${{ vars.DOCKER_REGISTRY }}/${{ github.repository }}/cache
|
||||
credentials: |
|
||||
${{ vars.DOCKER_REGISTRY }}=${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}
|
||||
destinations: |
|
||||
${{ vars.DOCKER_REGISTRY }}/${{ github.repository }}:${{ github.ref_name }} ${{ vars.REGISTRY_URL }}/${{ github.repository }}:${{ github.sha }}
|
||||
push: "true"
|
||||
if: github.ref != 'refs/heads/master'
|
Loading…
Reference in a new issue