add docker cache and tag image
This commit is contained in:
parent
d9e3290ede
commit
c3550df119
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,14 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: docker build
|
||||
run: docker build -t nseguin42/website:latest .
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: /var/lib/docker
|
||||
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-docker-
|
||||
- name: docker tag
|
||||
run: docker tag nseguin42/website:latest nseguin42/website:${{ github.sha }}
|
||||
- name: docker login
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
- name: docker push
|
||||
|
|
Loading…
Reference in a new issue