Skip to content

Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 #33

Bump google.golang.org/protobuf from 1.31.0 to 1.33.0

Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 #33

Workflow file for this run

name: Build and publish container image
on:
push:
env:
TAG_NAME: ghnotify:${{ github.sha }}
GITHUB_IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/ghnotify
GITHUB_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/ghnotify:${{ github.sha }}
GITHUB_IMAGE_LATEST: ghcr.io/${{ github.repository_owner }}/ghnotify:latest
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v1
- name: Build Docker image
run: docker build . -t ${{ env.GITHUB_IMAGE_LATEST }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image
run: docker push ${{ env.GITHUB_IMAGE_LATEST }}
- name: Rename image (commit ID)
run: docker tag ${{ env.GITHUB_IMAGE_LATEST }} ${{ env.GITHUB_IMAGE_NAME }}
- name: Push image
run: docker push ${{ env.GITHUB_IMAGE_NAME }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: "Published built ghnotify image: ${{ env.GITHUB_IMAGE_NAME }}"
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: build
steps:
- name: extract tag
id: tag
run: |
TAG=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
echo ::set-output name=tag::$TAG
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull Docker image
run: docker pull ${{ env.GITHUB_IMAGE_NAME }}
- name: Rename Docker image (tag name)
run: docker tag ${{ env.GITHUB_IMAGE_NAME }} "${{ env.GITHUB_IMAGE_REPO }}:${{ steps.tag.outputs.tag }}"
- name: Push Docker image (tag name)
run: docker push "${{ env.GITHUB_IMAGE_REPO }}:${{ steps.tag.outputs.tag }}"
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: "Published built ghnotify image: ${{ steps.tag.outputs.tag }}"