diff --git a/.github/workflows/rsyslog.yml b/.github/workflows/rsyslog.yml new file mode 100644 index 0000000..54fcbf1 --- /dev/null +++ b/.github/workflows/rsyslog.yml @@ -0,0 +1,56 @@ + +name: Create and publish a api image + +on: + push: + tags: + - dev-v** +env: + REGISTRY: ghcr.io/angrieralien + API_IMAGE_NAME: audito-maldito + Version: named-pipe-abstraction + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@40891eba8c2bcd1309b07ba8b11232f313e86779 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')" + + - name: Extract metadata (tags, labels) for Docker + id: meta-api + uses: docker/metadata-action@517f8b0c3b2daa800eac32a9a71024c8126d46a7 + with: + images: ${{ env.REGISTRY }}/${{ env.API_IMAGE_NAME }} + + - name: Build rsyslog and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: "./rsyslog" + push: true + file: ./rsyslog/Dockerfile + tags: ${{ env.REGISTRY }}/${{ env.API_IMAGE_NAME }}:${{ github.ref_name }}-rsyslog + labels: ${{ steps.meta-api.outputs.labels }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + push: true + file: Dockerfile + tags: ${{ env.REGISTRY }}/${{ env.API_IMAGE_NAME }}:${{ github.ref_name }} + labels: ${{ steps.meta-api.outputs.labels }} \ No newline at end of file