Skip to content

codespace

codespace #266

Workflow file for this run

name: Docker image
on:
workflow_dispatch:
push:
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker build -f .devcontainer/Dockerfile -t btwiuse/arch:${{ github.sha }} .
name: docker build
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - run: docker push btwiuse/arch:${{ github.sha }}
# name: docker push
# - run: |
# docker tag btwiuse/arch:${{ github.sha }} btwiuse/arch
# docker push btwiuse/arch
# if: github.ref == 'refs/heads/main'
# name: docker push latest
- run: |
docker tag btwiuse/arch:${{ github.sha }} btwiuse/arch:${{ github.ref_name }}
docker push btwiuse/arch:${{ github.ref_name }}
name: docker push branch