diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index b566792..f9526d2 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -7,11 +7,20 @@ jobs: - uses: actions/checkout@master - name: Convert repository name to lower case run: echo IMAGE_REPOSITORY="$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV" - - name: Publish to Registry - uses: docker/build-push-action@v1 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 with: - repository: ${{ env.IMAGE_REPOSITORY }}/arma3server - username: ${{ github.actor }} + registry: ghcr.io + username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - registry: docker.pkg.github.com - tag_with_ref: true + - name: Get smart tag + id: prepare + uses: Surgo/docker-smart-tag-action@v1 + with: + docker_image: ${{ env.IMAGE_REPOSITORY }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + push: true + tags: | + ghcr.io/${{ steps.prepare.outputs.tag }}