Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhunter2333 authored Jul 17, 2024
1 parent 48eef38 commit 5f3e49b
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,35 @@ name: Docker Image Release
on:
push:
tags:
- '*.*.*'
- "*.*.*"

jobs:
env:
REGISTRY: ghcr.io

jobs:
build:

runs-on: ubuntu-latest
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Docker Login
uses: docker/login-action@v1.8.0
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: dreamhunter2333.azurecr.io
username: ${{ secrets.AZURE_REGISTRY_USERNAME }}
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build the Docker image
run: docker build . --file docker/dockerfile --tag dreamhunter2333.azurecr.io/awsl/channel_telebot:${{ steps.get_version.outputs.VERSION }}
- name: Push the Docker image
run: docker push dreamhunter2333.azurecr.io/awsl/channel_telebot:${{ steps.get_version.outputs.VERSION }}
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
file: docker/dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ github.repository }}:latest

0 comments on commit 5f3e49b

Please sign in to comment.