forked from DarkCat09/docker-openj9-piped
fuck this shit
This commit is contained in:
parent
2e5a7247a7
commit
d9711cffa2
1 changed files with 64 additions and 0 deletions
64
.forgejo/workflows/build_and_release.yml
Normal file
64
.forgejo/workflows/build_and_release.yml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
name: Docker Image CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com)
|
||||||
|
ORGANIZATION: nm17 # Docker Hub organization or Forgejo username
|
||||||
|
GITHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
DOCKER_TOKEN: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
FORGEJO_URL: https://git.dc09.ru
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
images:
|
||||||
|
- dockerfile: 'Dockerfile.openj9'
|
||||||
|
image_name: 'openj9'
|
||||||
|
context: './'
|
||||||
|
- dockerfile: 'Dockerfile.piped'
|
||||||
|
image_name: 'piped'
|
||||||
|
context: './'
|
||||||
|
# Add more images as needed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
token: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
opts.auth: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels)
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/${{ matrix.image_name }}
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
github-token: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
github-server: https://${{ env.REGISTRY }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ${{ matrix.context }}
|
||||||
|
file: ${{ matrix.dockerfile }}
|
||||||
|
push: ${{ github.event_name == 'push' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
Loading…
Add table
Add a link
Reference in a new issue