35 lines
905 B
YAML
35 lines
905 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: cicd
|
|
steps:
|
|
- name: Prepare
|
|
id: prep
|
|
run: |
|
|
registry="${{ env.GITHUB_SERVER_URL }}"
|
|
echo "registry=${registry#*://}" | tee "${GITHUB_OUTPUT}"
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
id: build
|
|
uses: 'https://github.com/redhat-actions/buildah-build@v2'
|
|
with:
|
|
containerfiles: Dockerfile
|
|
image: ${{ env.GITHUB_REPOSITORY }}
|
|
tags: latest
|
|
|
|
- name: Push
|
|
uses: 'https://github.com/redhat-actions/push-to-registry@v2'
|
|
with:
|
|
registry: ${{ steps.prep.outputs.registry }}
|
|
image: ${{ steps.build.outputs.image }}
|
|
tags: ${{ steps.build.outputs.tags }}
|
|
username: ${{ vars.FORGEJO_USERNAME }}
|
|
password: ${{ secrets.FORGEJO_TOKEN }}
|