ajuste de ruta de script #35
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: Publicar Imagen Ordo de Docker desde Docker Hub a paquetes de GitHub | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
packages: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Pull Docker image from Docker Hub | |
run: | | |
docker pull fedired/ordo:latest | |
- name: Log in to the GitHub Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Tag Docker image for GitHub Packages | |
run: | | |
docker tag fedired/ordo:latest ghcr.io/${{ github.repository }}/ordo:latest | |
- name: Push Docker image to GitHub Packages | |
run: | | |
docker push ghcr.io/${{ github.repository }}/ordo:latest |