bump version #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build Images | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- README.md | |
env: | |
PLATFORMS: 'linux/amd64,linux/arm64,linux/arm/v7' | |
IMAGE_NAME: 'easypi/shadowsocks-rust' | |
SS_RUST_VERSION: '1.18.1' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v5 | |
with: | |
context: rust | |
platforms: ${{ env.PLATFORMS }} | |
build-args: | | |
SS_RUST_VERSION=${{ env.SS_RUST_VERSION }} | |
tags: | | |
${{ env.IMAGE_NAME }}:${{ env.SS_RUST_VERSION }} | |
${{ env.IMAGE_NAME }}:latest | |
# ghcr.io/${{ env.IMAGE_NAME }}:${{ env.SS_RUST_VERSION }} | |
# ghcr.io/${{ env.IMAGE_NAME }}:latest | |
push: true | |
- if: ${{ always() }} | |
uses: slackapi/slack-github-action@v1.24.0 | |
with: | |
channel-id: github | |
payload: | | |
{ | |
"attachments": [ | |
{ | |
"color": "${{ job.status == 'success' && 'good' || 'danger' }}", | |
"title": "${{ github.repository }}", | |
"title_link": "https://github.com/${{ github.repository }}", | |
"text": "docker build image result", | |
"fields": [ | |
{ | |
"title": "Image", | |
"value": "<https://hub.docker.com/r/${{ env.IMAGE_NAME }}|${{ env.IMAGE_NAME }}:${{ env.SS_RUST_VERSION }}>", | |
"short": true | |
}, | |
{ | |
"title": "Status", | |
"value": "${{ job.status }}", | |
"short": true | |
} | |
], | |
"footer": "Github Actions", | |
"footer_icon": "https://github.githubassets.com/favicon.ico" | |
} | |
] | |
} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |