forked from anaconda/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (61 loc) · 2.19 KB
/
concourse_rsync_resource.yml
File metadata and controls
67 lines (61 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build and publish the concourse-rsync-resource image
on:
push:
tags:
- 'crr-*'
paths:
- 'concourse-rsync-resource/Dockerfile'
- '.github/workflows/concourse_rsync_resource.yml'
pull_request:
paths:
- 'concourse-rsync-resource/Dockerfile'
- '.github/workflows/concourse_rsync_resource.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
submodules: true
- name: Login to DockerHub
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7
if: github.ref == 'refs/heads/master'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Public ECR
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7
if: github.ref == 'refs/heads/master'
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25
with:
version: latest
driver-opts: network=host
- name: Docker meta
id: meta
uses: docker/metadata-action@f2a13332ac1ce8c0a71aeac48a150dbb1838ab67
with:
images: |
continuumio/concourse-rsync-resource
public.ecr.aws/y0o4y9o3/concourse-rsync-resource
tags: |
type=ref,event=branch
type=ref,event=pr
type=match,pattern=crr-(.*),group=1
- name: build-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./concourse-rsync-resource
builder: ${{ steps.buildx.outputs.name }}
file: ./concourse-rsync-resource/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') }}