Test dev new mode #47
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: Docker Image Dev | ||
on: | ||
push: | ||
branches: [ dev ] | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/wifi_db:dev | ||
- name: Set up Docker Login for GitHub Packages Registry | ||
run: echo "//docker.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.docker/config.json | ||
- name: Pull and push Docker image to GitHub Packages Registry | ||
env: | ||
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | ||
run: | | ||
docker pull r4ulcl/wifi_db:dev | ||
docker tag r4ulcl/wifi_db:dev docker.pkg.github.com/r4ulcl/wifi_db:dev | ||
docker push docker.pkg.github.com/r4ulcl/wifi_db:dev | ||