# Workflow name name: Build and Push Ansible Container # Run-name for each workflow run run-name: Build and Push Ansible Container on: push: branches: - main paths: - 'containers/ansible/**' - '.forgejo/workflows/ansible.yml' workflow_dispatch: {} schedule: - cron: '0 20 * * 5' # Runs every Friday at 8 PM UTC env: CONTAINER_NAME: ansible # USER: ${{ github.actor }} USER: hbms jobs: build-and-push: # runs-on: docker runs-on: arm64 container: image: ghcr.io/catthehacker/ubuntu:act-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Forgejo Container Registry uses: docker/login-action@v3 with: registry: ${{ vars.REGISTRY }} username: ${{ env.USER }} password: ${{ secrets.PACKAGE_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: context: ./containers/${{ CONTAINER_NAME }}/ file: ./containers/${{ CONTAINER_NAME }}/Dockerfile push: true provenance: false platforms: linux/amd64, linux/arm64 tags: ${{ vars.REGISTRY }}/${{ env.USER }}/${{ env.CONTAINER_NAME }}:latest