first
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
zuk 2024-11-13 23:49:55 +01:00
commit ec896051ac
4 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,60 @@
name: Create and publish a Docker image
on:
push:
branches: ['main','test']
release:
types: [published]
env:
REGISTRY: git.zukka.net
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push-image:
runs-on: x86-64
permissions:
contents: read
packages: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.repository_owner }}
password: ${{ secrets.PAT }}
- name: Extract metadata (tags, labels) for Docker
id: meta
#uses: docker/metadata-action@v4
uses: https://github.com/docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
#platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View file

@ -0,0 +1,19 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: x86-64
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

3
Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM docker.io/alpine
CMD ["echo","bao"]

1
README.md Normal file
View file

@ -0,0 +1 @@
Per il runner: vediamo se va...