-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions: add docker image builder
- Loading branch information
navigaid
committed
Sep 4, 2022
1 parent
01f031a
commit b578c42
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Docker image | ||
|
||
on: | ||
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 |