Skip to content

Commit

Permalink
fix: remove step without run key
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelblijleven committed Jan 13, 2022
1 parent 576b62c commit b8be497
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,21 @@ jobs:
build-container:
runs-on: ubuntu-latest
needs: test
env:
REGISTRY: ghcr.io
USERNAME: marcelblijleven
IMAGE_NAME: ghcr.io/marcelblijleven/${{ github.event.repository.name }}
steps:
- uses: actions/checkout@v2
- name: Store current tag in GITHUB_ENV
run: echo "CURRENT_TAG=$(git describe --tags)" >> $GITHUB_ENV
- name: Push docker image to container registry
env:
REGISTRY: ghcr.io
USERNAME: marcelblijleven
IMAGE_NAME: ghcr.io/marcelblijleven/${{ github.event.repository.name }}
- run: docker build -t ${{ env.IMAGE_NAME }} -f Dockerfile .
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} --username ${{ env.USERNAME }} --password-stdin
- run: docker tag ${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}:latest
- run: docker tag ${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}:${{ env.CURRENT_TAG }}
- run: docker push ${{ env.IMAGE_NAME }} --all-tags
- name: Build image
run: docker build -t ${{ env.IMAGE_NAME }} -f Dockerfile .
- name: Log in to registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} --username ${{ env.USERNAME }} --password-stdin
- name: Tag with :latest
run: docker tag ${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}:latest
- name: Tag with current tag
run: docker tag ${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}:${{ env.CURRENT_TAG }}
- name: Push all tags to registry
run: docker push ${{ env.IMAGE_NAME }} --all-tags

0 comments on commit b8be497

Please sign in to comment.