From 386614e2391f06798e5481de038152d894129650 Mon Sep 17 00:00:00 2001 From: David Claeys Date: Fri, 9 Aug 2024 14:58:06 +0200 Subject: [PATCH] initialize actions --- .gitea/workflows/action.yml | 47 ++++++++++++++++++++++++++++++++++++ .github/workflows/action.yml | 36 +++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 .gitea/workflows/action.yml create mode 100644 .github/workflows/action.yml diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml new file mode 100644 index 0000000..e2fb95f --- /dev/null +++ b/.gitea/workflows/action.yml @@ -0,0 +1,47 @@ +name: 'Build docker container' +on: + push: + tags: + - '*' +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ GITHUB_WORKSPACE }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Docker + run: | + echo "Checking docker installation" + if command -v docker &> /dev/null; then + echo "Docker installation found" + else + echo "Docker installation not found. Docker will be installed" + curl -fsSL https://get.docker.com | sh + fi + - name: Set up Docker Buildx + uses: https://github.com/docker/setup-buildx-action@v3 + - name: Docker login + uses: https://github.com/docker/login-action@v3 + with: + registry: git.claeyscloud.com + username: nologin + password: ${{ secrets.PACKAGE_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: git.claeyscloud.com/david/webnut + tags: | + type=semver,pattern={{raw}} + type=sha + - name: Build and push + uses: https://github.com/docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 0000000..d11c1f4 --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,36 @@ +name: 'Build docker container' +on: + push: + tags: + - '*' +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: '${{ github.workspace }}' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/davidclaeysquinones/epg-info + tags: | + type=semver,pattern={{raw}} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}