Added custom push action. Pinned version 4.8.1 for compatibility issu… #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and push docker image | |
on: | |
push: | |
branches: [main] | |
env: | |
REGISTRY: registry.snakectf.org | |
TAG: latest | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push image | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile | |
push: true | |
tags: ${{ env.REGISTRY }}/management-2024/adminerevo:${{ env.TAG }} |