diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index b53dc18b..d3ccbf88 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -4,7 +4,8 @@ name: CI on: push: - branches: ["dev"] + branches: ["dev", "bwmac/IBCDPE-386/ghcr_ci"] + tags: ['v[0-9]*', '[0-9]+.[0-9]+*'] # Match tags that resemble a version pull_request: # Allows you to run this workflow manually from the Actions tab @@ -56,3 +57,36 @@ jobs: - run: pip install -U setuptools - run: pip install . - run: adt test_config.yaml -t ${{secrets.SYNAPSE_PAT}} + + docker-publish: + needs: [build, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/${{ github.repository }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=sha + latest + - name: Publish Docker Image + uses: docker/build-push-action@v3 + with: + context: . + build-args: | + TARBALL_PATH=${{ needs.prepare.outputs.tarball-path }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}