name: Build and Push SOPS Decrypt Image # This workflow runs on any push to the 'main' or 'master' branch on: push: branches: - main - master jobs: build-and-push: # Use a standard Linux runner runs-on: ubuntu-latest steps: # Step 1: Check out the repository code - name: Checkout repository uses: actions/checkout@v4 # Step 2: Log in to the Gitea Container Registry # It uses the secrets we created earlier. - name: Log in to Gitea Registry uses: docker/login-action@v3 with: # Use '!' for the registry address # Example: registry: gitea.yourcompany.com #registry: ${{ gitea.instance }} registry: git.m0ark.de username: ${{ vars.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} # Step 3: Build the Docker image and push it to the registry - name: Build and Push Docker Image uses: docker/build-push-action@v5 with: # The directory containing your Dockerfile context: . # Push the image after building push: true # Define the tags for the image tags: | git.m0ark.de/docker/sops-decrypt:latest git.m0ark.de/docker/sops-decrypt:${{ gitea.sha }}