diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 4e03a8d..f4b1ae3 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,3 +1,4 @@ + name: Docker Image CI on: @@ -16,3 +17,41 @@ jobs: - uses: actions/checkout@v4 - name: Build the Docker image run: docker build . --file Dockerfile --tag token-bouncer:$(date +%s) + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Archive Docker image + uses: actions/upload-artifact@v2 + with: + name: token-bouncer + path: . + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ github.run_number }}-${{ github.run_id }} + release_name: Release ${{ github.run_number }}-${{ github.run_id }} + body: | + Release of version main. + + ## Docker Image + ``` + docker pull token-bouncer:$(date +%s) + ``` + draft: false + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: . + asset_name: token-bouncer:$(date +%s) # Update the asset name as per your Docker image tag + asset_content_type: application/octet-stream