Skip to content

Bump aws-sdk from 2.1282.0 to 2.1407.0 in /queue-notifications #336

Bump aws-sdk from 2.1282.0 to 2.1407.0 in /queue-notifications

Bump aws-sdk from 2.1282.0 to 2.1407.0 in /queue-notifications #336

Workflow file for this run

name: Publish discord webhook image
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
publish:
name: Docker image build and push
permissions:
packages: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
if: github.actor != 'dependabot[bot]'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Generate docker image names
id: image
uses: actions/[email protected]
with:
script: |
const actor = '${{ github.actor }}';
let images = '${{ secrets.DOCKERHUB_LOGIN }}/ups-monitor';
if (actor != 'dependabot[bot]') {
images += '\nghcr.io/${{ github.repository }}'
}
core.setOutput('images', images);
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ steps.image.outputs.images }}
tags: |
type=schedule,pattern={{date 'YYYYMMDDHHmmss'}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
type=sha,format=long
type=semver,pattern={{version}},prefix=v
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{major}}.{{minor}},prefix=v
type=raw,value=${{ github.event.pull_request.head.ref }}
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64, linux/arm64
context: discord-webhook/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v1
# - name: Build, tag, and push image to Amazon ECR
# env:
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# ECR_REPOSITORY: ups-monitor-discord-webhook
# IMAGE_TAG: latest
# run: |
# cd discord-webhook
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG