fix(ci): add docker img pull #4
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: Semantic Versioning | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.21.1' | |
- name: Install dependencies | |
run: go mod download | |
- name: Semantic Release | |
run: | | |
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | |
docker pull ghcr.io/semantic-release/semantic-release:latest | |
docker run \ | |
-e GH_TOKEN=${{ secrets.GITHUB_TOKEN }} \ | |
-v $(pwd):/app \ | |
-w /app \ | |
ghcr.io/semantic-release/semantic-release | |
- name: Push new version tag | |
run: git push --follow-tags origin master |