This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
build(deps): bump word-wrap from 1.2.3 to 1.2.4 #36
Workflow file for this run
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: Build and publish docker image | |
on: push | |
jobs: | |
publish: | |
name: build and publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Registry login | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
- name: Build docker image | |
run: | | |
docker pull ghcr.io/${{ github.repository }}:latest || true | |
docker build . \ | |
--cache-from ghcr.io/${{ github.repository }}:latest \ | |
-t ghcr.io/${{ github.repository }}:latest \ | |
-t ghcr.io/${{ github.repository }}:$GITHUB_SHA | |
- name: Publish docker image | |
run: | | |
docker push ghcr.io/${{ github.repository }}:$GITHUB_SHA | |
- name: Publish to latest tag | |
if: github.ref == 'refs/heads/main' | |
run: | | |
docker push ghcr.io/${{ github.repository }}:latest |