Update build_skirnir_image_on_push_master.yml #12
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 Build and Push | |
env: | |
GITHUB_ACTIONS_LOG_LEVEL: debug | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Checkout Dockerfile repository | |
uses: actions/checkout@v2 | |
with: | |
repository: Hyldem0er/Skirnir-Docker-Image | |
path: . | |
- name: List contents of Docker directory | |
run: ls Docker/docker | |
- name: List contents of current directory | |
run: ls | |
- name: Run tree command in Docker directory | |
run: tree Docker/ | |
- name: Run tree command in root directory | |
run: tree . | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: Docker/docker | |
file: Skirnirfile | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/skirnir:latest |