Skip to content

Commit

Permalink
update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lining committed Nov 11, 2024
1 parent 2c27995 commit d41eb73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest

steps:
Expand All @@ -19,13 +21,17 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract version from tag
id: extract_version
run: echo "version=${GITHUB_REF##refs/tags/v}" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/npm-cert-syncer:latest
${{ secrets.DOCKER_USERNAME }}/npm-cert-syncer:${{ github.ref_name }}
${{ secrets.DOCKER_USERNAME }}/npm-cert-syncer:${{ env.version }}
- name: Create GitHub Release
uses: actions/create-release@v1
Expand Down

0 comments on commit d41eb73

Please sign in to comment.